Method | Method detail |
---|---|
getLeaderBoard() | Convenient getter method to get a list of leaderboard for any particular challenge. |
readNotify() | Convenient getter/setter method to set the status of read. |
public func getNotifyList(
limit: Int,
offset: Int,
success: @escaping (NotificationModel) -> (),
failure: @escaping (String) -> ())
Requested parameter:
limit: limit of data which you wanted to rander in one call
offset: page index
AppNotification.sharedInstance.getNotifyList(
limit:10,
offset: 1,
success: { NotificationDataModel in
guard let NotificationDataList = NotificationDataModel?.data else { return }
}) { [weak self] error, code in
guard let weakSelf = self else { return }
}
public func readNotify(
notificationId: String,
success: @escaping (NotificationReadModel) -> (),
failure: @escaping (String) -> ())
Requested parameter:
notificationId: Notification id which you get from the notification list method
AppNotification.sharedInstance.readNotify(
notificationid: notification id,
success: { NotificationReadModel in
guard let NotificationRead = NotificationReadModel?.data else { return }
}) { [weak self] error, code in
guard let weakSelf = self else { return }
}