Critter
Simple rust library to interact with the twitter V2 api.
Getting Started
Before proceeding, ensure you have your Twitter Developer App credentials handy - Consumer Key, Consumer Secret, Access Token, and Access Token Secret.
Installation
Include the following in your Cargo.toml:
[]
= "0.1.7"
Basic Examples
Creating a Client - OAuth 1.0a User Context (With Provided OAuth Tokens)
use ;
async
Getting the Details of The Authenticated User
match twitter.me.await
An example of obtaining additional details such as description and created_at is provided here.
Posting a simple Tweet
match twitter.tweet.await
Uploading Media
// Upload the media
let pic = match twitter.upload_media.await ;
// Make a tweet with said media attached
match twitter.tweet.await