8 releases

0.5.0 Aug 13, 2024
0.4.0 May 20, 2024
0.3.5 Mar 20, 2024
0.3.4 Feb 28, 2024

#1177 in Web programming

Download history 17/week @ 2024-07-23 7/week @ 2024-07-30 126/week @ 2024-08-13 1/week @ 2024-08-20 3/week @ 2024-08-27 8/week @ 2024-09-10 8/week @ 2024-09-17 21/week @ 2024-09-24 11/week @ 2024-10-01

542 downloads per month
Used in tosho

MIT license

67KB
1.5K SLoC

tosho-sjv

crates.io version

A minimal asynchronous client for the SJ API by V.

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_sjv::{SJClient, SJConfig, SJMode, SJPlatform};

#[tokio::main]
async fn main() {
    let config = SJConfig {
        user_id: 123,
        token: "xyz987abc".to_string(),
        instance: "abcxyz".to_string(),
        platform: SJPlatform::Android,
    };

    let client = SJClient::new(config, SJMode::VM);
    let manga = client.get_manga(vec![777]).await.unwrap();
    println!("{:?}", manga);
}

Authentication

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

$ tosho sj auth email password --help

Or, if you use the crates:

use tosho_sjv::{SJClient, SJConfig, SJMode, SJPlatform};

#[tokio::main]
async fn main() {
    let (account, instance_id) = SJClient::login("test@mail.com", "mypassword", SJMode::SJ, SJPlatform::Android).await.unwrap();

    let config = SJConfig::from_login_response(&account, instance_id, SJPlatform::Android);

    // Do stuff
    let client = SJClient::new(config, SJMode::SJ);
}

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)

Dependencies

~23–36MB
~637K SLoC