EnrichedActivity

open class EnrichedActivity<ActorType, ObjectType, ReactionType> : ActivityProtocol where ActorType : Enrichable, ObjectType : Enrichable, ReactionType : ReactionProtocol
extension EnrichedActivity: CustomStringConvertible

An enriched activity type with actor, object and reaction customizable types.

  • id

    The Stream id of the activity.

    Declaration

    Swift

    public var id: String
  • A wrapper for the actor performing the activity.

    Declaration

    Swift

    public let safeActor: MissingReference<ActorType>
  • The actor performing the activity.

    Declaration

    Swift

    public var actor: ActorType { get }
  • The verb of the activity.

    Declaration

    Swift

    public let verb: Verb
  • A wrapper for the object of the activity.

    Declaration

    Swift

    public let safeObject: MissingReference<ObjectType>
  • The object of the activity.

    Declaration

    Swift

    public var object: ObjectType { get }
  • A unique ID from your application for this activity. IE: pin:1 or like:300.

    Declaration

    Swift

    public var foreignId: String?
  • The optional time of the activity, isoformat. Default is the current time.

    Declaration

    Swift

    public var time: Date?
  • The feed id where the activity was posted.

    Declaration

    Swift

    public let originFeedId: FeedId?
  • An array allows you to specify a list of feeds to which the activity should be copied. One way to think about it is as the CC functionality of email.

    Declaration

    Swift

    public var feedIds: FeedIds?
  • An aggregated or notification feed group id.

    Declaration

    Swift

    public var feedGroupId: String?
  • Include reactions added by current user to all activities.

    Declaration

    Swift

    public var userOwnReactions: [ReactionKind : [ReactionType]]?
  • Include recent reactions to activities.

    Declaration

    Swift

    public var latestReactions: [ReactionKind : [ReactionType]]?
  • Include reaction counts to activities.

    Declaration

    Swift

    public var reactionCounts: [ReactionKind : Int]?
  • Create an activity.

    Declaration

    Swift

    required public init(actor: ActorType,
                         verb: Verb,
                         object: ObjectType,
                         foreignId: String? = nil,
                         time: Date? = nil,
                         feedIds: FeedIds? = nil,
                         originFeedId: FeedId? = nil)

    Parameters

    actor

    the actor performing the activity.

    verb

    the verb of the activity.

    object

    the object of the activity.

    foreignId

    a unique ID from your application for this activity.

    time

    a time of the activity, isoformat. Default is the current time.

    feedIds

    an array allows you to specify a list of feeds to which the activity should be copied.

  • Declaration

    Swift

    open func encode(to encoder: Encoder) throws
  • Declaration

    Swift

    public static func missed() -> Self
  • Declaration

    Swift

    public var isMissedReference: Bool { get }

Description

  • Declaration

    Swift

    open var description: String { get }