Leaderboard - GluedIn
Leaderboard SDK method
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.
  • Get Leaderboard record set method:
    API Class : LeaderBoard
    Method : getLeaderBoard
    Convenient getter method to get a list of leaderboard for any particular challenge.
    Request:
    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
    Response:
    • Response Object : FeedDataModel object
    • Keys which object have:
    • actingUserId : content generator user id
    • actingUserProfileImage : content generator user profile image
    • assetId : content id
    • assetType : Content type
    • createdAt : Notification created time
    • discription : description
    • event : event type
    • isRead : notification is read or not
    • userId : user id
    How to call?
    
    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 }
    
                }
  • Read Notification method:
    API Class : AppNotification
    Method : readNotify
    Convenient getter/setter method to set the status of read.
    Request:
    public func readNotify(
    
            notificationId: String,
    
            success: @escaping (NotificationReadModel) -> (),
    
            failure: @escaping (String) -> ())
    
     
    
     
    
    Requested parameter:
    
    notificationId: Notification id which you get from the notification list method
    Response:
    • Response Object : FeedDataModel object
    • Keys which object have:
    • isRead : Bool value which notify that you are successful
    • id : id of the content
    How to call?
    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 }
    
     
    
                }
Start for free, pay as you grow
No credit card required.