Add isPinned

This commit is contained in:
2024-09-17 10:44:05 +00:00
committed by GitHub
parent dd6219a1fb
commit b15bf70fa6
2 changed files with 8 additions and 1 deletions

View File

@@ -167,6 +167,7 @@ impl CheckUnknown for FanboxItem {
"feeRequired"+,
"hasAdultContent"+,
"isLiked"+,
"isPinned",
"isRestricted"+,
"likeCount"+,
"publishedDatetime"+,
@@ -178,7 +179,6 @@ impl CheckUnknown for FanboxItem {
"iconUrl",
"userId"+user_id,
],
"isPinned",
);
Ok(())
}

View File

@@ -80,6 +80,11 @@ impl FanboxPostArticle {
self.data["isLiked"].as_bool()
}
#[inline]
pub fn is_pinned(&self) -> Option<bool> {
self.data["isPinned"].as_bool()
}
#[inline]
pub fn is_restricted(&self) -> Option<bool> {
self.data["isRestricted"].as_bool()
@@ -185,6 +190,7 @@ impl CheckUnknown for FanboxPostArticle {
"hasAdultContent"+,
"imageForShare",
"isLiked"+,
"isPinned"+,
"isRestricted"+,
"likeCount"+,
"nextPost",
@@ -236,6 +242,7 @@ impl Debug for FanboxPostArticle {
.field("has_adult_content", &self.has_adult_content())
.field("image_for_share", &self.image_for_share())
.field("is_liked", &self.is_liked())
.field("is_pinned", &self.is_pinned())
.field("is_restricted", &self.is_restricted())
.field("like_count", &self.like_count())
.field("next_post", &self.next_post())