This repository provides Go package that implements a Twitter API v2 client.
This is a work in progress, and is not ready for production use. In particular, test coverage is not nearly as good as it should be. There are replay tests using responses captured from the production service, but a lot of invariants remain unverified.
The documentation could also use more work. All the packages and exported types have doc comments, but working examples are lacking. Normal test-based examples are tricky because there is not (as far as I know) a good test double for the API; however, some command-line tools would help.
I plan to improve on all of these, but in the meantime I do not recommend using this library for serious work. Please feel free to file issues, however. The library API is very much subject to change.
API Index
Here is the current status of v2 API endpoint implementations.
Edits
- DELETE 2/tweets/:id
- PUT 2/tweets/:id/hidden
- POST 2/users/:id/blocking
- DELETE 2/users/:id/blocking/:other
- POST 2/users/:id/bookmarks
- DELETE 2/users/:id/bookmarks/:tid
- POST 2/users/:id/following
- DELETE 2/users/:id/following/:other
- POST 2/users/:id/likes
- DELETE 2/users/:id/likes/:tid
- POST 2/users/:id/muting
- DELETE 2/users/:id/muting/:other
- POST 2/users/:id/pinned_lists
- DELETE 2/users/:id/pinned_lists/:lid
- POST 2/users/:id/retweets
- DELETE 2/users/:id/retweets/:tid
Lists
- GET 2/lists
- POST 2/lists
- DELETE 2/lists/:id
- PUT 2/lists/:id
- GET 2/lists/:id/followers
- GET 2/lists/:id/members
- POST 2/lists/:id/members
- DELETE 2/lists/:id/members/:userid
- GET 2/lists/:id/tweets
- GET 2/lists/:id/pinned_lists
Rules
- GET 2/tweets/search/stream/rules
- POST 2/tweets/search/stream/rules
- POST 2/tweets/search/stream/rules, dry_run=true
Tweets
- GET 2/tweets
- POST 2/tweets
- GET 2/tweets/:id/liking_users
- GET 2/tweets/:id/quote_tweets
- GET 2/tweets/count/all (requires academic access)
- GET 2/tweets/count/recent
- GET 2/tweets/sample/stream
- GET 2/tweets/search/all (requires academic access)
- GET 2/tweets/search/recent
- GET 2/tweets/search/stream
Users
- GET 2/users
- GET 2/users/:id/blocking
- GET 2/users/:id/bookmarks
- GET 2/users/:id/followed_lists
- GET 2/users/:id/followers
- GET 2/users/:id/following
- GET 2/users/:id/liked_tweets
- GET 2/users/:id/list_memberships
- GET 2/users/:id/mentions
- GET 2/users/:id/muting
- GET 2/users/:id/owned_lists
- GET 2/users/:id/retweeted_by
- GET 2/users/:id/tweets
- GET 2/users/by
- GET 2/users/me