mirror of
https://git.asonix.dog/asonix/activitystreams.git
synced 2024-11-28 23:01:01 +00:00
Move activity props into properties module
This commit is contained in:
parent
9011b35792
commit
677c8670ec
33 changed files with 569 additions and 766 deletions
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "activitystreams"
|
||||
description = "Activity Streams in Rust"
|
||||
version = "0.1.1"
|
||||
version = "0.2.0"
|
||||
license = "GPL-3.0"
|
||||
authors = ["asonix <asonix.dev@gmail.com>"]
|
||||
repository = "https://github.com/asonix/activitystreams"
|
||||
|
@ -10,7 +10,7 @@ keywords = ["activitystreams", "activitypub"]
|
|||
|
||||
[dependencies]
|
||||
activitystreams-traits = { version = "0.1", path = "activitystreams-traits" }
|
||||
activitystreams-types = { version = "0.1", path = "activitystreams-types" }
|
||||
activitystreams-types = { version = "0.2", path = "activitystreams-types" }
|
||||
|
||||
[dev-dependencies]
|
||||
failure = "0.1"
|
||||
|
|
|
@ -8,7 +8,7 @@ For basic use, add the following to your Cargo.toml
|
|||
```toml
|
||||
# Cargo.toml
|
||||
|
||||
activitystreams = "0.1"
|
||||
activitystreams = "0.2"
|
||||
```
|
||||
|
||||
And then use it in your project
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "activitystreams-types"
|
||||
description = "Base types from the Activity Streams spec"
|
||||
version = "0.1.1"
|
||||
version = "0.2.0"
|
||||
license = "GPL-3.0"
|
||||
authors = ["asonix <asonix.dev@gmail.com>"]
|
||||
repository = "https://github.com/asonix/activitystreams"
|
||||
|
|
|
@ -6,7 +6,7 @@ First, add the crate to your cargo.toml
|
|||
```toml
|
||||
# Cargo.toml
|
||||
|
||||
activitystreams-types = "0.1"
|
||||
activitystreams-types = "0.2"
|
||||
```
|
||||
|
||||
Then use it in your project!
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::AcceptType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::AcceptType, properties::{AcceptProperties, ActivityProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor accepts the object.
|
||||
|
@ -33,26 +34,9 @@ pub struct Accept {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: AcceptType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
/// Adds all valid accept properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub accept_props: AcceptProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::AddType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::AddType, properties::{ActivityProperties, AddProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor has added the object to the target.
|
||||
|
@ -34,26 +35,9 @@ pub struct Add {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: AddType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
/// Adds all valid add properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub add_props: AddProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::MoveType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::MoveType, properties::{ActivityProperties, MoveProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor has moved object from origin to target.
|
||||
|
@ -32,51 +33,9 @@ pub struct AMove {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: MoveType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
|
||||
/// Describes an indirect object of the activity from which the activity is directed.
|
||||
///
|
||||
/// The precise meaning of the origin is the object of the English preposition "from". For
|
||||
/// instance, in the activity "John moved an item to List B from List A", the origin of the
|
||||
/// activity is "List A".
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub origin: Option<serde_json::Value>,
|
||||
|
||||
/// Describes the indirect object, or target, of the activity.
|
||||
///
|
||||
/// The precise meaning of the target is largely dependent on the type of action being
|
||||
/// described but will often be the object of the English preposition "to". For instance, in
|
||||
/// the activity "John added a movie to his wishlist", the target of the activity is John's
|
||||
/// wishlist. An activity can have more than one target
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub target: Option<serde_json::Value>,
|
||||
/// Adds all valid move properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub move_props: MoveProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::AnnounceType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::AnnounceType, properties::{ActivityProperties, AnnounceProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor is calling the target's attention the object.
|
||||
|
@ -32,39 +33,9 @@ pub struct Announce {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: AnnounceType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
|
||||
/// Describes the indirect object, or target, of the activity.
|
||||
///
|
||||
/// The precise meaning of the target is largely dependent on the type of action being
|
||||
/// described but will often be the object of the English preposition "to". For instance, in
|
||||
/// the activity "John added a movie to his wishlist", the target of the activity is John's
|
||||
/// wishlist. An activity can have more than one target
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub target: Option<serde_json::Value>,
|
||||
/// Adds all valid announce properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub announce_props: AnnounceProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, IntransitiveActivity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, IntransitiveActivity, Object};
|
||||
|
||||
use super::{kind::ArriveType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::ArriveType, properties::{ActivityProperties, ArriveProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// An IntransitiveActivity that indicates that the actor has arrived at the location.
|
||||
|
@ -33,27 +34,9 @@ pub struct Arrive {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: ArriveType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// Describes an indirect object of the activity from which the activity is directed.
|
||||
///
|
||||
/// The precise meaning of the origin is the object of the English preposition "from". For
|
||||
/// instance, in the activity "John moved an item to List B from List A", the origin of the
|
||||
/// activity is "List A".
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub origin: serde_json::Value,
|
||||
/// Adds all valid arrive properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub arrive_props: ArriveProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::BlockType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::BlockType, properties::{ActivityProperties, BlockProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor is blocking the object.
|
||||
|
@ -34,26 +35,9 @@ pub struct Block {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: BlockType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
/// Adds all valid block properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub block_props: BlockProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::CreateType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::CreateType, properties::{ActivityProperties, CreateProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor has created the object.
|
||||
|
@ -30,26 +31,9 @@ pub struct Create {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: CreateType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
/// Adds all valid create properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub create_props: CreateProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::DeleteType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::DeleteType, properties::{ActivityProperties, DeleteProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor has deleted the object.
|
||||
|
@ -32,38 +33,9 @@ pub struct Delete {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: DeleteType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
|
||||
/// Describes an indirect object of the activity from which the activity is directed.
|
||||
///
|
||||
/// The precise meaning of the origin is the object of the English preposition "from". For
|
||||
/// instance, in the activity "John moved an item to List B from List A", the origin of the
|
||||
/// activity is "List A".
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub origin: Option<serde_json::Value>,
|
||||
/// Adds all valid delete properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub delete_props: DeleteProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::DislikeType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::DislikeType, properties::{ActivityProperties, DislikeProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor dislikes the object.
|
||||
|
@ -30,26 +31,9 @@ pub struct Dislike {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: DislikeType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
/// Adds all valid dislike properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub dislike_props: DislikeProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::FlagType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::FlagType, properties::{ActivityProperties, FlagProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor is "flagging" the object.
|
||||
|
@ -33,26 +34,9 @@ pub struct Flag {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: FlagType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
/// Adds all valid flag properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub flag_props: FlagProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::FollowType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::FollowType, properties::{ActivityProperties, FollowProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor is "following" the object.
|
||||
|
@ -34,26 +35,9 @@ pub struct Follow {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: FollowType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
/// Adds all valid follow properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub follow_props: FollowProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::IgnoreType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::IgnoreType, properties::{ActivityProperties, IgnoreProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor is ignoring the object.
|
||||
|
@ -32,26 +33,9 @@ pub struct Ignore {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: IgnoreType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
/// Adds all valid ignore properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub ignore_props: IgnoreProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::InviteType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::InviteType, properties::{ActivityProperties, InviteProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// A specialization of Offer in which the actor is extending an invitation for the object to the
|
||||
|
@ -31,38 +32,9 @@ pub struct Invite {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: InviteType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
|
||||
/// Describes the indirect object, or target, of the activity.
|
||||
///
|
||||
/// The precise meaning of the target is largely dependent on the type of action being
|
||||
/// described but will often be the object of the English preposition "to". For instance, in
|
||||
/// the activity "John added a movie to his wishlist", the target of the activity is John's
|
||||
/// wishlist. An activity can have more than one target
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub target: serde_json::Value,
|
||||
/// Adds all valid invite properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub invite_props: InviteProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::JoinType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::JoinType, properties::{ActivityProperties, JoinProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor has joined the object.
|
||||
|
@ -32,26 +33,9 @@ pub struct Join {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: JoinType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
/// Adds all valid join properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub join_props: JoinProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::LeaveType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::LeaveType, properties::{ActivityProperties, LeaveProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor has left the object.
|
||||
|
@ -32,26 +33,9 @@ pub struct Leave {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: LeaveType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
/// Adds all valid leave properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub leave_props: LeaveProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::LikeType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::LikeType, properties::{ActivityProperties, LikeProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor likes, recommends or endorses the object.
|
||||
|
@ -32,26 +33,9 @@ pub struct Like {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: LikeType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
/// Adds all valid like properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub like_props: LikeProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::ListenType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::ListenType, properties::{ActivityProperties, ListenProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor has listened to the object.
|
||||
|
@ -30,26 +31,9 @@ pub struct Listen {
|
|||
#[serde(rename = "type")]
|
||||
kind: ListenType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
object: serde_json::Value,
|
||||
/// Adds all valid listen properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub listen_props: ListenProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::OfferType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::OfferType, properties::{ActivityProperties, OfferProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor is offering the object.
|
||||
|
@ -32,39 +33,9 @@ pub struct Offer {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: OfferType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
|
||||
/// Describes the indirect object, or target, of the activity.
|
||||
///
|
||||
/// The precise meaning of the target is largely dependent on the type of action being
|
||||
/// described but will often be the object of the English preposition "to". For instance, in
|
||||
/// the activity "John added a movie to his wishlist", the target of the activity is John's
|
||||
/// wishlist. An activity can have more than one target
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub target: Option<serde_json::Value>,
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub offer_props: OfferProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -84,3 +84,371 @@ pub struct ActivityProperties {
|
|||
#[activitystreams(ab(Object, Link))]
|
||||
pub instrument: Option<serde_json::Value>,
|
||||
}
|
||||
|
||||
/// Struct with `actor` and optional `origin` and `target` properties
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ActorOptOriginAndTarget {
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// Describes an indirect object of the activity from which the activity is directed.
|
||||
///
|
||||
/// The precise meaning of the origin is the object of the English preposition "from". For
|
||||
/// instance, in the activity "John moved an item to List B from List A", the origin of the
|
||||
/// activity is "List A".
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub origin: Option<serde_json::Value>,
|
||||
|
||||
/// Describes the indirect object, or target, of the activity.
|
||||
///
|
||||
/// The precise meaning of the target is largely dependent on the type of action being
|
||||
/// described but will often be the object of the English preposition "to". For instance, in
|
||||
/// the activity "John added a movie to his wishlist", the target of the activity is John's
|
||||
/// wishlist. An activity can have more than one target
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub target: Option<serde_json::Value>,
|
||||
}
|
||||
|
||||
/// Struct with `actor` and `object` properties
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ActorAndObject {
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
}
|
||||
|
||||
/// Struct with `actor`, `object`, and `target` properties
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ActorObjectAndTarget {
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
|
||||
/// Describes the indirect object, or target, of the activity.
|
||||
///
|
||||
/// The precise meaning of the target is largely dependent on the type of action being
|
||||
/// described but will often be the object of the English preposition "to". For instance, in
|
||||
/// the activity "John added a movie to his wishlist", the target of the activity is John's
|
||||
/// wishlist. An activity can have more than one target
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub target: serde_json::Value,
|
||||
}
|
||||
|
||||
/// Struct with `actor`, `object`, and optional `target` properties
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ActorAndObjectOptTarget {
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
|
||||
/// Describes the indirect object, or target, of the activity.
|
||||
///
|
||||
/// The precise meaning of the target is largely dependent on the type of action being
|
||||
/// described but will often be the object of the English preposition "to". For instance, in
|
||||
/// the activity "John added a movie to his wishlist", the target of the activity is John's
|
||||
/// wishlist. An activity can have more than one target
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub target: Option<serde_json::Value>,
|
||||
}
|
||||
|
||||
/// Struct with `actor`, `object`, and optional `origin` properties
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ActorAndObjectOptOrigin {
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
|
||||
/// Describes an indirect object of the activity from which the activity is directed.
|
||||
///
|
||||
/// The precise meaning of the origin is the object of the English preposition "from". For
|
||||
/// instance, in the activity "John moved an item to List B from List A", the origin of the
|
||||
/// activity is "List A".
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub origin: Option<serde_json::Value>,
|
||||
}
|
||||
|
||||
/// Struct with `actor`, `object`, and optional `origin` and `target` properties
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ActorAndObjectOptOthers {
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
|
||||
/// Describes an indirect object of the activity from which the activity is directed.
|
||||
///
|
||||
/// The precise meaning of the origin is the object of the English preposition "from". For
|
||||
/// instance, in the activity "John moved an item to List B from List A", the origin of the
|
||||
/// activity is "List A".
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub origin: Option<serde_json::Value>,
|
||||
|
||||
/// Describes the indirect object, or target, of the activity.
|
||||
///
|
||||
/// The precise meaning of the target is largely dependent on the type of action being
|
||||
/// described but will often be the object of the English preposition "to". For instance, in
|
||||
/// the activity "John added a movie to his wishlist", the target of the activity is John's
|
||||
/// wishlist. An activity can have more than one target
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub target: Option<serde_json::Value>,
|
||||
}
|
||||
|
||||
/// Struct with `actor` and `origin` properties
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ActorAndOrigin {
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// Describes an indirect object of the activity from which the activity is directed.
|
||||
///
|
||||
/// The precise meaning of the origin is the object of the English preposition "from". For
|
||||
/// instance, in the activity "John moved an item to List B from List A", the origin of the
|
||||
/// activity is "List A".
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub origin: serde_json::Value,
|
||||
}
|
||||
|
||||
/// Properties for the Accept activity
|
||||
pub type AcceptProperties = ActorAndObject;
|
||||
|
||||
/// Properties for the Add activity
|
||||
pub type AddProperties = ActorAndObject;
|
||||
|
||||
/// Properties for the Move activity
|
||||
pub type MoveProperties = ActorAndObjectOptOthers;
|
||||
|
||||
/// Properties for the Announce activity
|
||||
pub type AnnounceProperties = ActorAndObjectOptTarget;
|
||||
|
||||
/// Properties for the Arrive activity
|
||||
pub type ArriveProperties = ActorAndOrigin;
|
||||
|
||||
/// Properties for the Block activity
|
||||
pub type BlockProperties = ActorAndObject;
|
||||
|
||||
/// Properties for the Create activity
|
||||
pub type CreateProperties = ActorAndObject;
|
||||
|
||||
/// Properties for the Delete activity
|
||||
pub type DeleteProperties = ActorAndObjectOptOrigin;
|
||||
|
||||
/// Properties for the Dislike activity
|
||||
pub type DislikeProperties = ActorAndObject;
|
||||
|
||||
/// Properties for the Flag activity
|
||||
pub type FlagProperties = ActorAndObject;
|
||||
|
||||
/// Properties for the Follow activity
|
||||
pub type FollowProperties = ActorAndObject;
|
||||
|
||||
/// Properties for the Ignore activity
|
||||
pub type IgnoreProperties = ActorAndObject;
|
||||
|
||||
/// Properties for the Invite activity
|
||||
pub type InviteProperties = ActorObjectAndTarget;
|
||||
|
||||
/// Properties for the Join activity
|
||||
pub type JoinProperties = ActorAndObject;
|
||||
|
||||
/// Properties for the Leave activity
|
||||
pub type LeaveProperties = ActorAndObject;
|
||||
|
||||
/// Properties for the Like activity
|
||||
pub type LikeProperties = ActorAndObject;
|
||||
|
||||
/// Properties for the Listen activity
|
||||
pub type ListenProperties = ActorAndObject;
|
||||
|
||||
/// Properties for the Offer activity
|
||||
pub type OfferProperties = ActorAndObjectOptTarget;
|
||||
|
||||
/// Properties for the Question activity
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct QuestionProperties {
|
||||
/// Identifies an exclusive option for a Question.
|
||||
///
|
||||
/// Use of `one_of` implies that the Question can have only a single answer. To indicate that a
|
||||
/// `Question` can have multiple answers, use `any_of`.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub one_of: Option<serde_json::Value>,
|
||||
|
||||
/// Identifies an inclusive option for a Question.
|
||||
///
|
||||
/// Use of `any_of` implies that the Question can have multiple answers. To indicate that a
|
||||
/// `Question` can have only one answer, use `one_of`.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub any_of: Option<serde_json::Value>,
|
||||
}
|
||||
|
||||
/// Properties for the Read activity
|
||||
pub type ReadProperties = ActorAndObject;
|
||||
|
||||
/// Properties for the Reject activity
|
||||
pub type RejectProperties = ActorAndObject;
|
||||
|
||||
/// Properties for the Remove activity
|
||||
pub type RemoveProperties = ActorAndObjectOptOthers;
|
||||
|
||||
/// Properties for the TentativeAccept activity
|
||||
pub type TentativeAcceptProperties = ActorAndObject;
|
||||
|
||||
/// Properties for the TentativeReject activity
|
||||
pub type TentativeRejectProperties = ActorAndObject;
|
||||
|
||||
/// Properties for the Travel activity
|
||||
pub type TravelProperties = ActorOptOriginAndTarget;
|
||||
|
||||
/// Properties for the Undo activity
|
||||
pub type UndoProperties = ActorAndObject;
|
||||
|
||||
/// Properties for the Update activity
|
||||
pub type UpdateProperties = ActorAndObject;
|
||||
|
||||
/// Properties for the View activity
|
||||
pub type ViewProperties = ActorAndObject;
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, IntransitiveActivity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, IntransitiveActivity, Object};
|
||||
|
||||
use super::{kind::QuestionType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::QuestionType, properties::{ActivityProperties, QuestionProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Represents a question being asked.
|
||||
|
@ -37,27 +38,9 @@ pub struct Question {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: QuestionType,
|
||||
|
||||
/// Identifies an exclusive option for a Question.
|
||||
///
|
||||
/// Use of `one_of` implies that the Question can have only a single answer. To indicate that a
|
||||
/// `Question` can have multiple answers, use `any_of`.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub one_of: Option<serde_json::Value>,
|
||||
|
||||
/// Identifies an inclusive option for a Question.
|
||||
///
|
||||
/// Use of `any_of` implies that the Question can have multiple answers. To indicate that a
|
||||
/// `Question` can have only one answer, use `one_of`.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub any_of: Option<serde_json::Value>,
|
||||
/// Adds all valid question properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub question_props: QuestionProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::ReadType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::ReadType, properties::{ActivityProperties, ReadProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor has read the object.
|
||||
|
@ -30,26 +31,9 @@ pub struct Read {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: ReadType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
/// Adds all valid read properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub read_props: ReadProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::RejectType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::RejectType, properties::{ActivityProperties, RejectProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor is rejecting the object.
|
||||
|
@ -32,26 +33,9 @@ pub struct Reject {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: RejectType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
/// Adds all valid reject properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub reject_props: RejectProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::RemoveType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::RemoveType, properties::{ActivityProperties, RemoveProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor is removing the object.
|
||||
|
@ -32,51 +33,9 @@ pub struct Remove {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: RemoveType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
|
||||
/// Describes an indirect object of the activity from which the activity is directed.
|
||||
///
|
||||
/// The precise meaning of the origin is the object of the English preposition "from". For
|
||||
/// instance, in the activity "John moved an item to List B from List A", the origin of the
|
||||
/// activity is "List A".
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub origin: Option<serde_json::Value>,
|
||||
|
||||
/// Describes the indirect object, or target, of the activity.
|
||||
///
|
||||
/// The precise meaning of the target is largely dependent on the type of action being
|
||||
/// described but will often be the object of the English preposition "to". For instance, in
|
||||
/// the activity "John added a movie to his wishlist", the target of the activity is John's
|
||||
/// wishlist. An activity can have more than one target
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub target: Option<serde_json::Value>,
|
||||
/// Adds all valid remove properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub remove_props: RemoveProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::TentativeAcceptType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::TentativeAcceptType, properties::{ActivityProperties, TentativeAcceptProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// A specialization of Accept indicating that the acceptance is tentative.
|
||||
|
@ -30,26 +31,9 @@ pub struct TentativeAccept {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: TentativeAcceptType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
/// Adds all valid tentative_accept properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub tentative_accept_props: TentativeAcceptProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::TentativeRejectType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::TentativeRejectType, properties::{ActivityProperties, TentativeRejectProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// A specialization of Reject in which the rejection is considered tentative.
|
||||
|
@ -30,26 +31,9 @@ pub struct TentativeReject {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: TentativeRejectType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
/// Adds all valid tentative_reject properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub tentative_reject_props: TentativeRejectProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, IntransitiveActivity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, IntransitiveActivity, Object};
|
||||
|
||||
use super::{kind::TravelType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::TravelType, properties::{ActivityProperties, TravelProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor is traveling to target from origin.
|
||||
|
@ -33,41 +34,9 @@ pub struct Travel {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: TravelType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// Describes an indirect object of the activity from which the activity is directed.
|
||||
///
|
||||
/// The precise meaning of the origin is the object of the English preposition "from". For
|
||||
/// instance, in the activity "John moved an item to List B from List A", the origin of the
|
||||
/// activity is "List A".
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub origin: Option<serde_json::Value>,
|
||||
|
||||
/// Describes the indirect object, or target, of the activity.
|
||||
///
|
||||
/// The precise meaning of the target is largely dependent on the type of action being
|
||||
/// described but will often be the object of the English preposition "to". For instance, in
|
||||
/// the activity "John added a movie to his wishlist", the target of the activity is John's
|
||||
/// wishlist. An activity can have more than one target
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub target: Option<serde_json::Value>,
|
||||
/// Adds all valid travel properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub travel_props: TravelProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::UndoType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::UndoType, properties::{ActivityProperties, UndoProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor is undoing the object.
|
||||
|
@ -36,26 +37,9 @@ pub struct Undo {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: UndoType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
/// Adds all valid undo properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub undo_props: UndoProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::UpdateType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::UpdateType, properties::{ActivityProperties, UpdateProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor has updated the object.
|
||||
|
@ -35,26 +36,9 @@ pub struct Update {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: UpdateType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
/// Adds all valid update properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub update_props: UpdateProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use activitystreams_traits::{Activity, Link, Object};
|
||||
use serde_json;
|
||||
use activitystreams_traits::{Activity, Object};
|
||||
|
||||
use super::{kind::ViewType, properties::ActivityProperties};
|
||||
use super::{
|
||||
kind::ViewType, properties::{ActivityProperties, ViewProperties},
|
||||
};
|
||||
use object::properties::ObjectProperties;
|
||||
|
||||
/// Indicates that the actor has viewed the object.
|
||||
|
@ -30,26 +31,9 @@ pub struct View {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: ViewType,
|
||||
|
||||
/// Describes one or more entities that either performed or are expected to perform the
|
||||
/// activity.
|
||||
///
|
||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||
/// Link.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub actor: serde_json::Value,
|
||||
|
||||
/// When used within an Activity, describes the direct object of the activity.
|
||||
///
|
||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||
/// activity is the movie added.
|
||||
///
|
||||
/// - Range: `Object` | `Link`
|
||||
/// - Functional: false
|
||||
#[activitystreams(ab(Object, Link))]
|
||||
pub object: serde_json::Value,
|
||||
/// Adds all valid view properties to this struct
|
||||
#[serde(flatten)]
|
||||
pub view_props: ViewProperties,
|
||||
|
||||
/// Adds all valid object properties to this struct
|
||||
#[serde(flatten)]
|
||||
|
|
Loading…
Reference in a new issue