NotificationsApi
@interface NotificationsApi : NodeDependant
Provides access to Textile notifications related APIs
-
List notifications
Declaration
Objective-C
- (id)list:(nullable NSString *)offset limit:(long)limit error:(NSError *_Nullable *_Nullable)error;Swift
func list(_ offset: String?, limit: Int) throws -> AnyParameters
offsetThe offset to query from
limitThe max number of notifications to return
errorA reference to an error pointer that will be set in the case of an error
Return Value
An object containing a list of notifications
-
Declaration
Objective-C
- (long)countUnread;Swift
func countUnread() -> IntReturn Value
The number of unread notifications
-
Mark a notification as read
Declaration
Objective-C
- (void)read:(nonnull NSString *)notificationId error:(NSError *_Nullable *_Nullable)error;Swift
func read(_ notificationId: String, error: NSErrorPointer)Parameters
notificationIdThe id of the notification to mark as read
errorA reference to an error pointer that will be set in the case of an error
-
Mark all notifications as read
Declaration
Objective-C
- (void)readAll:(NSError *_Nullable *_Nullable)error;Swift
func readAll(_ error: NSErrorPointer)Parameters
errorA reference to an error pointer that will be set in the case of an error
-
Accept an invite via an invite notification
Declaration
Objective-C
- (nonnull NSString *)acceptInvite:(nonnull NSString *)notificationId error:(NSError *_Nullable *_Nullable)error;Swift
func acceptInvite(_ notificationId: String, error: NSErrorPointer) -> StringParameters
notificationIdThe id of the invite notification
errorA reference to an error pointer that will be set in the case of an error
Return Value
The hash of the newly created thread join block
-
Ignore an invite via an invite notification
Declaration
Objective-C
- (void)ignoreInvite:(nonnull NSString *)notificationId error:(NSError *_Nullable *_Nullable)error;Swift
func ignoreInvite(_ notificationId: String, error: NSErrorPointer)Parameters
notificationIdThe id of the invite notification
errorA reference to an error pointer that will be set in the case of an error
View on GitHub
NotificationsApi Class Reference