PLhery / node-twitter-api-v2

Strongly typed, full-featured, light, versatile yet powerful Twitter API v1.1 and v2 client for Node.js.
https://www.npmjs.com/package/twitter-api-v2
Apache License 2.0
1.24k stars 174 forks source link

No pagination for v2.streamRules method although corresponding endpoint supports it #537

Open lior-ashkenazi-zencity opened 1 week ago

lior-ashkenazi-zencity commented 1 week ago

The endpoint tweets/search/stream/rules (GET). in Twitter API v2 supports pagination, but the encapsulating method v2.streamRules doesn't support pagination.

Please observe that once the rules stored in Twitter API v2 pass 1,000 rules, pagination will be toggled, and here:

export declare type StreamingV2GetRulesResult = DataAndMetaV2<StreamingV2Rule[], SentMeta>;

Instead of SentMeta, we should have PaginableCountMetaV2.

Version Node: v16.14.2 twitter-api-v2: 1.16.4 OS: macOS 13.5 (22G74)

rveitch commented 1 week ago

I have run into this issue as well and am working around it for now, but would prefer to continue using this library instead of manual pagination.

PLhery commented 6 days ago

Hello, this library is not actively maintained since elone takeover, but any PR is welcomed!