mangadex_api::v5::manga::id

Module put

Source
Expand description

Builder for the chapter update endpoint.

https://api.mangadex.org/docs/swagger.html#/Manga/put-chapter-id

§Examples

use std::collections::HashMap;

use uuid::Uuid;

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

let client = MangaDexClient::default();

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

let manga_id = Uuid::new_v4();
let mut manga_titles = HashMap::new();
manga_titles.insert(Language::English, "Updated Manga Title".to_string());
let res = client
    .manga()
    .id(manga_id)
    .put()
    .title(manga_titles)
    .version(2u32)
    .send()
    .await?;

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

Structs§