Module mangadex_api::v5::upload::upload_images
source · [−]Expand description
Builder for uploading images to the upload session.
https://api.mangadex.org/swagger.html#/Upload/put-upload-session-file
Currently, there is a maximum of 10 files per request.
use uuid::Uuid;
use mangadex_api::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 file1_bytes = vec![0];
let file2_bytes = vec![1];
let res = client
.upload()
.upload_images()
.session_id(&session_id)
.add_file(file1_bytes.into())
.add_file(file2_bytes.into())
.build()?
.send()
.await?;
println!("upload images: {:?}", res);
Structs
Upload images to the upload session.
Builder for UploadImages
.
Enums
Error type for UploadImagesBuilder