https://github.com/niuhuan/patreon-rs
Patreon client crate for rust
https://github.com/niuhuan/patreon-rs
oauth patreon patreon-api patreon-client rust
Last synced: about 2 months ago
JSON representation
Patreon client crate for rust
- Host: GitHub
- URL: https://github.com/niuhuan/patreon-rs
- Owner: niuhuan
- Created: 2023-04-04T11:10:26.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-18T14:31:46.000Z (10 months ago)
- Last Synced: 2025-06-30T03:08:22.350Z (3 months ago)
- Topics: oauth, patreon, patreon-api, patreon-client, rust
- Language: Rust
- Homepage:
- Size: 26.4 KB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
PATREON
=======A patreon client crate for rust.
```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(...);
}
```## Features
- [x] OAuth
- [x] Get authorization url
- [x] Get tokens from code
- [x] Refresh tokens
- [x] Api
- [x] Current user
- [x] Identity
- [x] Identity include Memberships
- [x] Identity include Campaign
- [x] Webhook
- [x] Check check_signature
- [x] Parse