g8rswimmer / go-twitter

This is a go library for twitter v2 API integration.
MIT License
312 stars 62 forks source link

v2 RecentSearchV2 response error #108

Open dybxin opened 2 years ago

dybxin commented 2 years ago

maybe happend at:

resp, err := client.TweetRecentSearch(context.Background(), query, opts)
    if err != nil {
        log.Fatal(err)
        return nil, err
    }

logs:

twiiter callout status 429 UsageCapExceeded:Usage cap exceeded: Monthly product cap
g8rswimmer commented 2 years ago

@dybxin what version of the library are you using? v2.0.0-beta11 added rate limits to the response to help aid in this.

dybxin commented 2 years ago

@g8rswimmer now i import version is https://pkg.go.dev/github.com/g8rswimmer/go-twitter@v1.1.4/v2.

g8rswimmer commented 2 years ago

@dybxin I think that I need to update the go mod in v2 to allow for it. I think that you can get the updated package with @master

g8rswimmer commented 2 years ago

@dybxin you should be able to get the newest version of v2 which includes spaces, lists and rate limiting

go get -u github.com/g8rswimmer/go-twitter/v2@v2.0.0-beta12

go.mod example

module twiiter-poc

go 1.17

require github.com/g8rswimmer/go-twitter/v2 v2.0.0-beta12 // indirect
dybxin commented 2 years ago

@g8rswimmer thanks a lot, I will get back to you later.

dybxin commented 2 years ago

@g8rswimmer today, i test the v2.0.0-beta12. unfortunately, i got error: twiiter callout status 429 UsageCapExceeded:Usage cap exceeded: Monthly product cap. i found twitter api docs https://developer.twitter.com/en/docs/twitter-api/tweet-caps. so every monthly the application total request is limit?