NotificationFeed
public final class NotificationFeed : Feed
The NotificationFeed
type makes it easy to add notifications to your app. Notifications cannot be followed by other feeds,
but you can write directly to a Notification feed.
-
Receive a notification feed activities type of
Activity
.Declaration
Swift
@discardableResult public func get(enrich: Bool = true, pagination: Pagination = .none, markOption: FeedMarkOption = .none, includeReactions reactionsOptions: FeedReactionsOptions = [], completion: @escaping GroupCompletion<Activity, NotificationGroup<Activity>>) -> Cancellable
Parameters
enrich
when using collections, you can request to enrich activities to include them.
pagination
a pagination options.
markOption
mark options to update feed notifications as read/seen.
reactionsOptions
options to include reactions to activities. Check optionsin docs for
FeedReactionsOptions
completion
a completion handler with a notification group with the
Activity
type.Return Value
- a cancellable object to cancel the request.
-
Receive a notification feed activities with a custom activity type.
Declaration
Swift
@discardableResult public func get<T: ActivityProtocol>(typeOf: T.Type, enrich: Bool = true, pagination: Pagination = .none, markOption: FeedMarkOption = .none, includeReactions reactionsOptions: FeedReactionsOptions = [], completion: @escaping GroupCompletion<T, NotificationGroup<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.
markOption
mark options to update feed notifications as read/seen.
reactionsOptions
options to include reactions to activities. Check optionsin docs for
FeedReactionsOptions
completion
a completion handler with a notification group with a custom activity type.
Return Value
- a cancellable object to cancel the request.