Expand description
Builder for uploading a new manga cover.
https://api.mangadex.org/swagger.html#/Cover/upload-cover
use uuid::Uuid;
use mangadex_api::MangaDexClient;
use mangadex_api::types::{Language, 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 file_bytes = vec![0];
let res = client
.cover()
.upload()
.manga_id(&manga_id)
.file(file_bytes)
.locale(Language::English)
.build()?
.send()
.await?;
println!("upload cover: {:?}", res);
Structs
Upload a new cover for a manga.
Builder for UploadCover
.
Enums
Error type for UploadCoverBuilder