Make `TwitterAds::Cursor` less aggressive to support native targeting values
brndnblck opened this issue · 0 comments
brndnblck commented
The current implementation of TwitterAds::Cursor
is quite aggressive. It basically functions in exhaust mode all the time especially if you're trying to coerce the object into something else.
This is fine most of the time, but for native support of Targeting Criteria values this could be an issue (eg. TV for example which has 18k+ possible values). In situations like that where we're dealing with excessively large cursor sizes, we should be much more conservative and fetch new pages lazily.
- Implement common enumerable methods like
first
,last
and[]
so that they can lazily fetch. - Implement automatic handling of
TwitterAds::RateLimit
for cursors inexhaust=true
mode.