Closed kurtawirth closed 5 years ago
Suppose the user sets timeout = 30
. Is the idea to interrupt the stream after 20 seconds if, say, 1000 tweets have already been pulled? If so, might it make sense to reuse the n_tweets
argument (doing different things with it, depending on the API being used)?
Correct! Agreed on both fronts.
The only argument to rtweet::stream_tweets()
that might enable this appears to be ...
, which allows other unspecified parameters to be added to the URL for the query. The only Twitter API parameter that might facilitate this appears to be count
. It appears (from digging into rtweet:::.search_tweets
) that, in fact, this is the parameter that make_url()
is using. However, it's not clear to me whether we have "elevated access". We should try adding an argument count = n_tweets
to stream_tweets()
in botscan()
line 62, and see if this is possible for us, or might be for users with "elevated access".
For a description of count
, see https://developer.twitter.com/en/docs/tweets/filter-realtime/guides/basic-stream-parameters.html
Have confirmed that count =
will not work due to a lack of "elevated access". Also unsure as to whether this function would achieve what we hope to achieve here.
Without access to the count
parameter, I propose we table and close this idea.
Agreed.
Argument should stream until n reaches a given number.