| Crates.io | tosho-nids |
| lib.rs | tosho-nids |
| version | 0.1.1 |
| created_at | 2026-01-01 02:46:12.33219+00 |
| updated_at | 2026-01-01 02:56:14.345501+00 |
| description | An asynchronous client for NI by DS |
| homepage | https://github.com/noaione/tosho-mango |
| repository | https://github.com/noaione/tosho-mango |
| max_upload_size | |
| id | 2015658 |
| size | 137,488 |
A minimal asynchronous client for NI by DS.
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_nids::{Filter, NIClient};
#[tokio::main]
async fn main() {
let constants = tosho_nids::constants::get_constants(1); // Web
let client = NIClient::new(None, constants).unwrap();
let filter = Filter::default()
.add_filter(tosho_nids::FilterType::Title, "Attack on Titan")
.with_per_page(18);
let issues = client.get_issues(&filter).await.unwrap();
println!("Issues: {:?}", issues);
}
Also see: FILTERS.md for more information about the filters system.
You can authenticate to access your collection and other personalized data via either JWT token or email and password.
$ tosho ni auth <email> <password>
Or, directly with JWT token:
$ tosho ni auth-token <jwtToken>
Or, if you use the crates:
use tosho_nids::NIClient;
#[tokio::main]
async fn main() {
let constants = tosho_nids::constants::get_constants(1); // Web
let client = NIClient::new(Some("your_jwt_token_here"), constants).unwrap();
// Now you can make authenticated requests
let my_series = client.get_series_run_collections(None).await.unwrap();
println!("My series: {:?}", my_series);
}
Or using email and password:
use tosho_nids::NIClient;
#[tokio::main]
async fn main() {
let constants = tosho_nids::constants::get_constants(1); // Web
let login_response = NIClient::login("email@example.com", "your_password", None).await.unwrap();
let client = NIClient::new(Some(login_response.data().tokens().access_token()), constants).unwrap();
// Now you can make authenticated requests
let my_series = client.get_series_run_collections(None).await.unwrap();
println!("My series: {:?}", my_series);
}
To get the JWT token, you need to login to your account on the website, then:
access_token and copy the valueSome pages may have multiple frames for guided reading. These frames are defined by their coordinates and dimensions relative to the page size.
Minimized example:
"frames": [
{
"index": 0,
"x": 0.04467951784087,
"y": 0.032608695652174,
"width": 0.91787978937503,
"height": 0.20893719806763,
"opacity": 0.75
}
]
With the full image size being 2550x3263 pixels, the first frame would be located at:
That would means you would need to create a highlight box at (114, 106) with a size of 2340x681 pixels on the full image for the first frame.
Note:
color field, although currently unused but may be used in the future to define the outer area color.
image and then creating mask of white + black rectangles to highlight the frame area.
color field.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)