feat(apb): likes and shares optional collections
This commit is contained in:
parent
b1e4c4e79b
commit
bdf48bb7cb
1 changed files with 8 additions and 0 deletions
|
@ -56,6 +56,8 @@ pub trait Object : Base {
|
||||||
fn preview(&self) -> Node<Self::Object> { Node::Empty } // also in link
|
fn preview(&self) -> Node<Self::Object> { Node::Empty } // also in link
|
||||||
fn published(&self) -> Option<chrono::DateTime<chrono::Utc>> { None }
|
fn published(&self) -> Option<chrono::DateTime<chrono::Utc>> { None }
|
||||||
fn replies(&self) -> Node<Self::Collection> { Node::Empty }
|
fn replies(&self) -> Node<Self::Collection> { Node::Empty }
|
||||||
|
fn likes(&self) -> Node<Self::Collection> { Node::Empty }
|
||||||
|
fn shares(&self) -> Node<Self::Collection> { Node::Empty }
|
||||||
fn start_time(&self) -> Option<chrono::DateTime<chrono::Utc>> { None }
|
fn start_time(&self) -> Option<chrono::DateTime<chrono::Utc>> { None }
|
||||||
fn summary(&self) -> Option<&str> { None }
|
fn summary(&self) -> Option<&str> { None }
|
||||||
fn tag(&self) -> Node<Self::Object> { Node::Empty }
|
fn tag(&self) -> Node<Self::Object> { Node::Empty }
|
||||||
|
@ -100,6 +102,8 @@ pub trait ObjectMut : BaseMut {
|
||||||
fn set_preview(self, val: Node<Self::Object>) -> Self; // also in link
|
fn set_preview(self, val: Node<Self::Object>) -> Self; // also in link
|
||||||
fn set_published(self, val: Option<chrono::DateTime<chrono::Utc>>) -> Self;
|
fn set_published(self, val: Option<chrono::DateTime<chrono::Utc>>) -> Self;
|
||||||
fn set_replies(self, val: Node<Self::Collection>) -> Self;
|
fn set_replies(self, val: Node<Self::Collection>) -> Self;
|
||||||
|
fn set_likes(self, val: Node<Self::Collection>) -> Self;
|
||||||
|
fn set_shares(self, val: Node<Self::Collection>) -> Self;
|
||||||
fn set_start_time(self, val: Option<chrono::DateTime<chrono::Utc>>) -> Self;
|
fn set_start_time(self, val: Option<chrono::DateTime<chrono::Utc>>) -> Self;
|
||||||
fn set_summary(self, val: Option<&str>) -> Self;
|
fn set_summary(self, val: Option<&str>) -> Self;
|
||||||
fn set_tag(self, val: Node<Self::Object>) -> Self;
|
fn set_tag(self, val: Node<Self::Object>) -> Self;
|
||||||
|
@ -140,6 +144,8 @@ impl Object for serde_json::Value {
|
||||||
crate::getter! { preview -> node <Self as Object>::Object }
|
crate::getter! { preview -> node <Self as Object>::Object }
|
||||||
crate::getter! { published -> chrono::DateTime<chrono::Utc> }
|
crate::getter! { published -> chrono::DateTime<chrono::Utc> }
|
||||||
crate::getter! { replies -> node Self::Collection }
|
crate::getter! { replies -> node Self::Collection }
|
||||||
|
crate::getter! { likes -> node Self::Collection }
|
||||||
|
crate::getter! { shares -> node Self::Collection }
|
||||||
crate::getter! { start_time::startTime -> chrono::DateTime<chrono::Utc> }
|
crate::getter! { start_time::startTime -> chrono::DateTime<chrono::Utc> }
|
||||||
crate::getter! { summary -> &str }
|
crate::getter! { summary -> &str }
|
||||||
crate::getter! { tag -> node <Self as Object>::Object }
|
crate::getter! { tag -> node <Self as Object>::Object }
|
||||||
|
@ -218,6 +224,8 @@ impl ObjectMut for serde_json::Value {
|
||||||
crate::setter! { preview -> node <Self as Object>::Object }
|
crate::setter! { preview -> node <Self as Object>::Object }
|
||||||
crate::setter! { published -> chrono::DateTime<chrono::Utc> }
|
crate::setter! { published -> chrono::DateTime<chrono::Utc> }
|
||||||
crate::setter! { replies -> node Self::Collection }
|
crate::setter! { replies -> node Self::Collection }
|
||||||
|
crate::setter! { likes -> node Self::Collection }
|
||||||
|
crate::setter! { shares -> node Self::Collection }
|
||||||
crate::setter! { start_time::startTime -> chrono::DateTime<chrono::Utc> }
|
crate::setter! { start_time::startTime -> chrono::DateTime<chrono::Utc> }
|
||||||
crate::setter! { summary -> &str }
|
crate::setter! { summary -> &str }
|
||||||
crate::setter! { tag -> node <Self as Object>::Object }
|
crate::setter! { tag -> node <Self as Object>::Object }
|
||||||
|
|
Loading…
Reference in a new issue