Module mangadex_api::v5::upload::commit_session
source · [−]Expand description
Builder for committing an active upload session.
https://api.mangadex.org/swagger.html#/Upload/commit-upload-session
Examples
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 session_id = Uuid::new_v4();
let res = client
.upload()
.commit_session()
.session_id(&session_id)
.volume(Some("1"))
.chapter(Some("1"))
.title(Some("Chapter Title"))
.translated_language(Language::English)
.build()?
.send()
.await?;
println!("commit upload session: {:?}", res);
Structs
Custom request builder to handle nested struct.