Expand description

Builder for creating a new report.

https://api.mangadex.org/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()
    .username(Username::parse("myusername")?)
    .password(Password::parse("hunter23")?)
    .build()?
    .send()
    .await?;

let reason_id = Uuid::new_v4();
let manga_id = Uuid::new_v4();

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

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

Structs

Enums

Error type for CreateReportBuilder