Closed spencer17x closed 6 months ago
Did you try the example?
Yeah, that's what I used as an example
If I want to get relevant tweets in real time, can I use this api
What the stream
method does is, given a polling rate, it checks if any new tweets are made, if made, it returns the tweets. Note that a tweet is returned only if it's a new one starting from the time the streaming was started.
If I want to get relevant tweets in real time, can I use this api
So yes, you can. You just need to pass a filter to get the relevant tweets and set a desired polling rate. Here are all the filters available.
Do I need a polling request? Or the request will always return the latest tweet
Do I need a polling request?
The method implicitly does the polling. You just need to call it and iterate over the returned AsyncGenerator. The example given shows how to do it. The only thing you need to change is instead of console.log
, do whatever you want with the received tweets.
Or the request will always return the latest tweet
The request will always return the most recent tweet that was made after the polling started.
Such as title