Expand description
Builder for uploading images to the upload session.
https://api.mangadex.org/docs/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()
.post()
.username(Username::parse("myusername")?)
.password(Password::parse("hunter23")?)
.send()
.await?;
*/
let session_id = Uuid::new_v4();
let file1_bytes = vec![0];
let file2_bytes = vec![1];
let res = client
.upload()
.upload_session_id(session_id)
.post()
.add_file(file1_bytes.into())
.add_file(file2_bytes.into())
.send()
.await?;
println!("upload images: {:?}", res);
Structsยง
- Upload images to the upload session.
- Builder for
UploadImages
.