1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
use mangadex_api_types::MangaDexDateTime;
use serde::Deserialize;
use url::Url;

use crate::v5::{localizedstring_array_or_map, LocalizedString};

/// General author information.
#[derive(Clone, Debug, Deserialize, PartialEq)]
#[serde(rename_all = "camelCase")]
#[non_exhaustive]
pub struct AuthorAttributes {
    pub name: String,
    pub image_url: Option<String>,
    #[serde(with = "localizedstring_array_or_map")]
    pub biography: LocalizedString,
    /// <https://twitter.com>
    pub twitter: Option<Url>,
    /// <https://www.pixiv.net>
    pub pixiv: Option<Url>,
    /// <https://www.melonbooks.co.jp>
    pub melon_book: Option<Url>,
    /// <https://www.fanbox.cc>
    pub fan_box: Option<Url>,
    /// <https://booth.pm>
    pub booth: Option<Url>,
    /// <https://www.nicovideo.jp>
    pub nico_video: Option<Url>,
    /// <https://skeb.jp>
    pub skeb: Option<Url>,
    /// <https://fantia.jp>
    pub fantia: Option<Url>,
    /// <https://www.tumblr.com>
    pub tumblr: Option<Url>,
    /// <https://www.youtube.com>
    pub youtube: Option<Url>,
    /// [https://weibo.cn/u/](https://weibo.cn)
    /// or
    /// [https://m.weibo.cn/u/](https://m.weibo.cn)
    pub weibo: Option<Url>,
    /// <https://blog.naver.com/>
    pub naver: Option<Url>,
    pub website: Option<Url>,
    pub version: u32,
    /// Datetime in `YYYY-MM-DDTHH:MM:SS+HH:MM` format.
    pub created_at: MangaDexDateTime,
    /// Datetime in `YYYY-MM-DDTHH:MM:SS+HH:MM` format.
    pub updated_at: Option<MangaDexDateTime>,
}