twitter-v2
Supports all of the Twitter v2 API endpoints, but many remain fairly untested due to the complexity of the API and time restraints. PRs and Issues are very welcome! As this repo currently has limited documentation, please check out the amazing Twitter API v2 Docs for information.
Features
- oauth2: Included by default. See the examples for how to use.
- native-tls: Use
native-tlsas TLS backend (default) - rustls-tls: Use
rustlsas TLS backend
Example
use TwitterApi;
use ;
use ;
let auth = new;
let tweet = new
.get_tweet
.tweet_fields
.send
.await?
.into_data
.expect;
assert_eq!;
assert_eq!;
assert_eq!;
let auth: Oauth2Token = from_str?;
let my_followers = new
.with_user_ctx
.await?
.get_my_followers
.user_fields
.max_results
.send
.await?
.into_data;
License: MIT OR Apache-2.0