FlatFeed
public final class FlatFeed : Feed
FlatFeed
are the only feeds that can be followed, and therefore are a good type to setup for adding activities.
FlatFeed
can also be used to consume activities from other feeds - in a “timeline”-like manner.
-
Receive a feed activities type of
Activity
.Declaration
Swift
@discardableResult public func get(enrich: Bool = true, pagination: Pagination = .none, ranking: String? = nil, includeReactions reactionsOptions: FeedReactionsOptions = [], completion: @escaping ActivitiesCompletion<Activity>) -> Cancellable
Parameters
enrich
when using collections, you can request to enrich activities to include them.
pagination
a pagination options.
ranking
the custom ranking formula used to sort the feed, must be defined in the dashboard.
reactionsOptions
options to include reactions to activities. Check options in docs for
FeedReactionsOptions
completion
a completion handler with an array of the
Activity
type.Return Value
- a cancellable object to cancel the request.
-
Receive a feed activities with a custom activity type.
Declaration
Swift
@discardableResult public func get<T: ActivityProtocol>(typeOf: T.Type, enrich: Bool = true, pagination: Pagination = .none, ranking: String? = nil, includeReactions reactionsOptions: FeedReactionsOptions = [], completion: @escaping ActivitiesCompletion<T>) -> Cancellable
Parameters
typeOf
a type of custom activities that conformed to
ActivityProtocol
.enrich
when using collections, you can request to enrich activities to include them.
pagination
a pagination options.
ranking
the custom ranking formula used to sort the feed, must be defined in the dashboard.
reactionsOptions
options to include reactions to activities. Check options in docs for
FeedReactionsOptions
completion
a completion handler with an array of a custom activity type.
Return Value
- a cancellable object to cancel the request.