Expand description

Builder for creating a Manga relation.

This endpoint requires authentication.

https://api.mangadex.org/swagger.html#/Manga/post-manga-relation

Examples

use uuid::Uuid;

use mangadex_api::types::MangaRelation;
use mangadex_api::v5::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 manga_id = Uuid::new_v4();
let target_manga_id = Uuid::new_v4();
let res = client
    .manga()
    .create_relation()
    .manga_id(&manga_id)
    .target_manga(&target_manga_id)
    .relation(&MangaRelation::SpinOff)
    .build()?
    .send()
    .await?;

println!("created manga relation: {:?}", res);

Structs

Enums

Error type for CreateMangaRelationBuilder