Notification method
Method Method detail
getNotificationsList() Convenient getter method to get all notification list for the logged in user.
updateNotificationStatus() Convenient setter method to change the notification isread status.
  • Get Notification list data:
    API Class : AppNotification
    Method : getNotificationsList
    Convenient getter method to get all notification list for the logged in user.
    Request:
    Requested parameter.
    /**
         * This Method will used for get notifications list.
         * - Parameter limit: passing limit of list.
         * - Parameter offSet: passing number of page.
         * - Parameter success: passing object of model.
         * - Returns : Nil
         */
    AppNotification.sharedInstance.getNotificationsList(limit: limit, offset: offSet) { response in
                //success?(response)
            } failure: { error, code in
                //failure(error, code)
            }
    Response:
    • Response Object : FeedDataModel object
    • Keys which object have:
    • actingUserId : String action userid who generate this notification
    • actingUserProfileImage : action user profile image
    • assetId : content id on which notification generated
    • assetType : Content type
    • createdAt : Timestamp for created time and date
    • description : description of the content
    • event : action event type name
    • isReady : have you read the notification?
    • userId : Logged in user id
    • video thumbnail : video thumbnail
  • Update Notification status:
    API Class : AppNotification
    Method : updateNotificationStatus
    Convenient getter/setter method to set the status of read.
    Request:
    Requested parameter.
    /**
         * This Method will used for change notification status.
          - Parameter notificationId: Passing notification id to server.
         * - Parameter success: passing object of model.
         * - Returns : Nil
         */
    AppNotification.sharedInstance.updateNotificationStatus(notificationId: notificationId) { response in
                success?(response)
            } failure: { error in
                print(error)
            }
    Response:
    • Response Object : True/false