ActivityProtocol

public protocol ActivityProtocol : Enrichable, OriginalRepresentable, Reactionable

A protocol for the Activity type.

  • Undocumented

    Declaration

    Swift

    associatedtype ActorType = Enrichable
  • Undocumented

    Declaration

    Swift

    associatedtype ObjectType = Enrichable
  • id

    The Stream id of the activity.

    Declaration

    Swift

    var id: String { get set }
  • The actor performing the activity.

    Declaration

    Swift

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

    Declaration

    Swift

    var verb: Verb { get }
  • The object of the activity.

    Note

    It shouldn’t be empty.

    Declaration

    Swift

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

    Declaration

    Swift

    var foreignId: String? { get set }
  • The optional time of the activity, isoformat. Default is the current time.

    Declaration

    Swift

    var time: Date? { get set }
  • 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

    var feedIds: FeedIds? { get set }

Enrichable

  • referenceId Extension method

    The activity is enrichable and here is a referenceId by default. For example, in case when you need to make a repost activity where object would be the original activity.

    Declaration

    Swift

    public var referenceId: String { get }

Likes

  • isUserLiked Extension method

    True if the current user like the activity. See ReactionKind.like.

    Declaration

    Swift

    public var isUserLiked: Bool { get }
  • likesCount Extension method

    A number of likes. See ReactionKind.like.

    Declaration

    Swift

    public var likesCount: Int { get }
  • userLikedReaction Extension method

    A like reaction of the current user. See ReactionKind.like.

    Declaration

    Swift

    public var userLikedReaction: ReactionType? { get }

Reposts

  • isUserReposted Extension method

    True if the current user repost the activity. See ReactionKind.repost.

    Declaration

    Swift

    public var isUserReposted: Bool { get }
  • repostsCount Extension method

    A number of reposts. See ReactionKind.repost.

    Declaration

    Swift

    public var repostsCount: Int { get }
  • userRepostReaction Extension method

    A repost reaction of the current user. See ReactionKind.repost.

    Declaration

    Swift

    public var userRepostReaction: ReactionType? { get }

Comments

  • commentsCount Extension method

    A number of comments. See ReactionKind.comment.

    Declaration

    Swift

    public var commentsCount: Int { get }