This commit is contained in:
2022-07-10 12:11:34 +00:00
committed by GitHub
parent 54e382db90
commit 22fb473a6c
4 changed files with 76 additions and 24 deletions

View File

@@ -1,5 +1,7 @@
use super::check::CheckUnkown;
use crate::parser::json::parse_u64;
use json::JsonValue;
use proc_macros::check_json_keys;
use std::fmt::Debug;
pub struct FanboxComment {
@@ -83,6 +85,13 @@ impl FanboxComment {
}
}
impl CheckUnkown for FanboxComment {
fn check_unknown(&self) -> Result<(), super::error::FanboxAPIError> {
check_json_keys!("id"+, "body"+, "createdDatetime"+, "isLiked"+, "isOwn"+, "likeCount"+, "parentCommentId", "replies", "rootCommentId", "user": ["userId", "name", "iconUrl"]);
Ok(())
}
}
impl Debug for FanboxComment {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("FanboxComment")