mangadex_api::v5::upload::begin

Module post

Source
Expand description

Builder for starting an upload session.

https://api.mangadex.org/docs/swagger.html#/Upload/begin-upload-session

use uuid::Uuid;

use mangadex_api::MangaDexClient;
// use mangadex_api_types::{Password, Username};
use mangadex_api_types::Language;

let client = MangaDexClient::default();

/*

    let _login_res = client
        .auth()
        .login()
        .post()
        .username(Username::parse("myusername")?)
        .password(Password::parse("hunter23")?)
        .send()
        .await?;

 */

let group_id = Uuid::new_v4();
let manga_id = Uuid::new_v4();
let res = client
    .upload()
    .begin()
    .post()
    .add_group_id(&group_id)
    .manga_id(manga_id)
    .send()
    .await?;

println!("session start: {:?}", res);

Structsยง