mangadex_api::v5::report

Module post

Source
Expand description

Builder for creating a new report.

https://api.mangadex.org/docs/swagger.html#/Report/post-report

§Examples

use uuid::Uuid;

use mangadex_api_types::ReportCategory;
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 reason_id = Uuid::new_v4();
let manga_id = Uuid::new_v4();

let res = client
    .report()
    .post()
    .category(ReportCategory::Manga)
    .reason(reason_id)
    .object_id(manga_id)
    .send()
    .await?;

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

Structs§