Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Latest commit

 

History

History
95 lines (77 loc) · 2.92 KB

README.md

File metadata and controls

95 lines (77 loc) · 2.92 KB

twitter

Note: It is no longer practical or worthwhile for me to continue work on this library, as Twitter now charges $100 per month for minimal API access. I have therefore archived the repository.

This repository provides Go package that implements an experimental client for the Twitter API v2. It is no longer under active development.

This was an experiment, 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.

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