Crate tweetust[−][src]
Tweetust is a simple wrapper for Twitter API.
Getting started
This is a Twitter API wrapper, so you must lean Twitter API. Visit the official document.
After getting the API key, let's start using tweetust.
How to get the access token
See oauth::request_token function. After getting the access token, you can use to_authenticator function to make OAuthAuthenticator.
How to create OAuthAuthenticator with an access token string
The first tweeting
When you created OAuthAuthenticator and set to auth
variable, you can tweet in a minute.
use tweetust::*; let handler = DefaultHttpHandler::with_https_connector().unwrap(); let auth = OAuthAuthenticator::new("API Key", "API Secret", "Access Token", "Access Token Secret"); let your_tweet = TwitterClient::new(auth, handler) .statuses() .update("My First Tweet!") .execute();
It's easy for those who have leaned about Twitter, isn't it?
Re-exports
pub extern crate chrono; |
pub extern crate hyper; |
pub extern crate hyper_native_tls; |
pub use clients::TwitterClient; |
pub use conn::DefaultHttpHandler; |
pub use conn::application_only_authenticator::ApplicationOnlyAuthenticator; |
pub use conn::oauth_authenticator::OAuthAuthenticator; |
Modules
clients | |
conn |
The low-level functions for connecting to Twitter with any authorization. Usually, you will not use this module. |
models | |
oauth |
The functions to get your access token for 3-legged OAuth or PIN-based OAuth. |
oauth2 |
The functions to get and invalidate your access token for Application-only authentication. |
Enums
TwitterError |
Type Definitions
TwitterResult |