Expand description
Niconico login functionality module
This module provides functionality to authenticate with the Niconico video platform and obtain a user session token.
§Examples
use niconico::{login, Credentials};
use secrecy::ExposeSecret;
#[tokio::main]
async fn main() {
dotenvy::dotenv().ok();
let credentials = envy::from_env::<Credentials>().unwrap();
let user_session = login(credentials).await.unwrap();
println!("{:?}", user_session.0.expose_secret());
}
Structs§
- Credentials
- Credentials required for Niconico login
- User
Session - Represents a successful login session
Enums§
- Login
Error - Possible errors that can occur during the login process
Functions§
- login
- Attempts to log in to Niconico using the provided credentials
Type Aliases§
- Login
Result - Type alias for the Result of a login attempt