Crates.io | tosho-rbean |
lib.rs | tosho-rbean |
version | 0.3.0 |
source | src |
created_at | 2024-02-22 04:54:58.954813 |
updated_at | 2024-08-13 08:49:04.687741 |
description | An asynchronous client for 小豆 (Red Bean) |
homepage | https://tosho.dev |
repository | https://github.com/noaione/tosho-mango |
max_upload_size | |
id | 1148944 |
size | 66,665 |
A minimal asynchronous client for 小豆 (Red Bean) API.
The following crate is used by the tosho
app.
Download the tosho
app, or you can utilize this crate like any other Rust crate:
use tosho_rbean::{RBClient, RBConfig, RBPlatform};
#[tokio::main]
async fn main() {
let config = RBConfig {
token: "123".to_string(),
refresh_token: "abcxyz".to_string(),
platform: RBPlatform::Android,
};
let mut client = RBClient::new(config);
// Refresh token
client.refresh_token().await.unwrap();
let user = client.get_user().await.unwrap();
println!("{:?}", user);
}
The following sources only have one method of authentication, and that method uses your email and password.
$ tosho rb auth email password --help
Or, if you use the crates:
use tosho_rbean::{RBClient, RBPlatform};
#[tokio::main]
async fn main() {
let login_results = RBClient::login("email@test.com", "mypassword", RBPlatform::Android).await.unwrap();
println!("{:?}", login_results);
}
This project is designed as an experiment and to create a local copy for personal use. These tools will not circumvent any paywall, and you will need to purchase and own each chapter with your own account to be able to make your own local copy.
We're not responsible if your account got deactivated.
This project is licensed with MIT License (LICENSE or http://opensource.org/licenses/MIT)