mirror of
https://github.com/lifegpc/pixiv_downloader.git
synced 2026-07-08 01:32:41 +08:00
Update
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
|
use super::super::check::CheckUnkown;
|
||||||
|
use super::super::error::FanboxAPIError;
|
||||||
use super::block::FanboxArticleBlock;
|
use super::block::FanboxArticleBlock;
|
||||||
use crate::fanbox_api::FanboxClientInternal;
|
use crate::fanbox_api::FanboxClientInternal;
|
||||||
use json::JsonValue;
|
use json::JsonValue;
|
||||||
|
use proc_macros::check_json_keys;
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
@@ -36,6 +39,21 @@ impl FanboxArticleBody {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl CheckUnkown for FanboxArticleBody {
|
||||||
|
fn check_unknown(&self) -> Result<(), FanboxAPIError> {
|
||||||
|
check_json_keys!("blocks"+, "imageMap", "fileMap", "embedMap", "urlEmbedMap",);
|
||||||
|
match self.blocks() {
|
||||||
|
Some(blocks) => {
|
||||||
|
for i in blocks {
|
||||||
|
i.check_unknown()?;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
None => {}
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Debug for FanboxArticleBody {
|
impl Debug for FanboxArticleBody {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
f.debug_struct("FanboxArticleBody")
|
f.debug_struct("FanboxArticleBody")
|
||||||
|
|||||||
Reference in New Issue
Block a user