Socket
Socket
Sign inDemoInstall

github.com/creachadair/twitter

Package Overview
Dependencies
2
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/creachadair/twitter

Package twitter implements a client for the Twitter API v2. This package is in development and is not yet ready for production use. The general structure of an API call is to first construct a query, then invoke that query with a context on a client: Package "types" contains the type and constant definitions for the API. Queries to look up tweets by ID or username, to search recent tweets, and to search or sample streams of tweets are defined in package "tweets". Queries to look up users by ID or user name are defined in package "users". Queries to read or update search rules are defined in package "rules". Queries to create, edit, delete, and show the contents of lists are defined in package "lists".


Version published

Readme

Source

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

FAQs

Last updated on 13 Aug 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc