mangadex_api::v5::manga::draft::id::commit

Module post

Source
Expand description

Builder for submitting (committing) a Manga Draft.

This endpoint requires authentication.

A Manga Draft that is to be submitted must have at least one cover, must be in the “draft” state and must be passed the correct version in the request body.

https://api.mangadex.org/swagger.html#/Manga/commit-manga-draft

§Examples

use uuid::Uuid;

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

let client = MangaDexClient::default();

/*
    // Put your login script here
    let _login_res = client
        .auth()
        .login()
        .username(Username::parse("myusername")?)
        .password(Password::parse("hunter23")?)
        .build()?
        .send()
        .await?;
 */

let manga_id = Uuid::new_v4();
let res = client
    .manga()
    .draft()
    .id(manga_id)
    .commit()
    .post()
    .version(1_u32)
    .send()
    .await?;

println!("submitted manga draft: {:?}", res);

Structs§