Crates.io | patreon |
lib.rs | patreon |
version | 0.1.4 |
source | src |
created_at | 2023-04-04 11:12:03.399664 |
updated_at | 2023-04-07 07:41:02.929794 |
description | Patreon client |
homepage | |
repository | https://github.com/niuhuan/patreon-rs |
max_upload_size | |
id | 830103 |
size | 64,483 |
A patreon client crate for rust.
async fn example() {
// OAuth client
let client = PatreonOAuth {
client_id: env!("CLIENT_ID").to_string(),
client_secret: env!("CLIENT_SECRET").to_string(),
redirect_uri: env!("REDIRECT_URI").to_string(),
..Default::default()
};
// authorization by url
println!("{}", oauth.get_authorization_url());
oauth.get_tokens("");
// Api Clinet
let api = PatreonApi {
access_token: env!("ACCESS_TOKEN").to_string(),
..Default::default()
};
println!("{:?}", api.ident().await);
// webhook
let webhook = Webhook {
webhook_secret,
};
webhook.check_signature(...);
webhook.parse_event(...);
}