Crate tosho_amap

Crate tosho_amap 

Source
Expand description

§tosho-amap

crates.io version

A minimal asynchronous client for the AM API by AP.

The following crate is used by the tosho app.

§Usage

Download the tosho app, or you can utilize this crate like any other Rust crate:

use tosho_amap::{AMClient, AMConfig};

#[tokio::main]
async fn main() {
    let config = AMConfig::new("123", "abcxyz", "xyz987abc");
    let client = AMClient::new(config).unwrap();

    let manga = client.get_comic(48000051).await.unwrap();
    println!("{:?}", manga);
}

§Authentication

The following sources only have one method of authentication, and that method uses your email and password.

$ tosho am auth email password

Or, if you use this crates as library:

use tosho_amap::AMClient;

#[tokio::main]
async fn main() {
    let login_res = AMClient::login("test@mail.com", "mypassword").await.unwrap();
}

§Disclaimer

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.

§License

This project is licensed with MIT License (LICENSE or http://opensource.org/licenses/MIT)

Re-exports§

pub use config::*;

Modules§

config
Provides the configuration Struct for the client.
constants
Provides constants used in the library.
helper
Provides a collection of helper Structs that can be used.
models
A module containing all the models used in the library.

Structs§

AMClient
Main client for interacting with the AP AM