go-twitter icon indicating copy to clipboard operation
go-twitter copied to clipboard

Add next_token to TweetRecentCount

Open 1l0 opened this issue 2 years ago • 4 comments

Actually next_token could've been sent to and responded from GET /2/tweets/counts/recent typically when minute would be set for granularity paremeter. It's not documented in the official documentation though.

1l0 avatar Jun 05 '22 09:06 1l0

When I run this

https://api.twitter.com/2/tweets/counts/recent?query=lakers

I do not get a next_token. Do you have an example that would provide that output?

g8rswimmer avatar Jun 05 '22 21:06 g8rswimmer

For example

https://api.twitter.com/2/tweets/counts/recent?start_time=2022-06-01T00%3A00%3A00Z&granularity=minute&query=lakers

You will have to modify start_time if it exceeded the time range (<7 days).

1l0 avatar Jun 05 '22 22:06 1l0

could you add a unit test for this?

g8rswimmer avatar Jun 05 '22 23:06 g8rswimmer

Sure but it may take a while in my priority.

1l0 avatar Jun 06 '22 10:06 1l0