twapi 0.7.0

A simple Twitter library. This is easy for customize.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! Application Only Authentication OAuth2
use super::TwapiError;

pub async fn get_bearer_token(
    consumer_key: &str,
    consumer_secret: &str,
) -> Result<String, TwapiError> {
    match twapi_reqwest::oauth::get_bearer_token(consumer_key, consumer_secret).await? {
        Some(access_token) => Ok(access_token),
        None => Err(TwapiError::NotExists),
    }
}