1 unstable release
| 0.1.0 | Nov 23, 2025 |
|---|
#1953 in Web programming
105KB
2K
SLoC
Pixiv API Rust Client
This is a Rust client library for interacting with Pixiv API, providing authentication, network requests and other features.
Features
- OAuth2 password credential authentication
- Automatic token refresh
- Support for multiple runtimes (tokio/async-std/smol)
- Comprehensive error handling
- Detailed logging
- SNI bypass support (for bypassing network restrictions)
Quick Start
use pixiv_rs::auth::AuthClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Initialize logging
tracing_subscriber::fmt::init();
// Create authentication client
let mut auth_client = AuthClient::new()?;
// Login with username and password
let auth_response = auth_client.login("your_username", "your_password").await?;
println!("Login successful! User ID: {}", auth_response.user.id);
Ok(())
}
Dependencies
~6–27MB
~359K SLoC