Discover - GluedIn
Discover methods
Method Method detail
getChallengeLeaderBoardDetails() Convenient getter method to get leaderboard data.
getCuratedRailList() Convenient getter method to get curated rail list data.
getCuratedRailDetails() Convenient getter method to get curated rail detail detail by rail id list data.
getSearchedChallengesList() Convenient getter method to get searched challenges list data.
getSearchedHashtagList() Convenient getter method to get searched hashtag list data.
getCuratedRailList() Convenient getter method to get searched video list data.
getSearchedUserList() Convenient getter method to get searched user list data.
  • Get Leaderboard data method:
    API Class : DiscoverData
    Method : getChallengeLeaderBoardDetails
    Convenient getter method to get leaderboard data.
    Request:
    Requested parameter.
    hashtagId : hashtag id.
    DiscoverData.sharedInstance.getChallengeLeaderBoardDetails(hashtagId: hashtagId) { [weak self] result in
                    guard let weakSelf = self else { return }
                    weakSelf.didGetLeaderBoardData(result: result)
                    // Response to handle
                } failure: { [weak self] error, code in
                    guard let weakSelf = self else { return }
                    // Error message to handle
                }
    Response:
    • Response Object : Feed data Model object
    • statusMessage : API header status message
    • page : page number
    • perPage: number per page
    • status : status of the response api
    • success : success message
    • total : total number of record
    • statusCode: status code to handle
    • feed Model: [FeedModel]
  • Get Discover Curated Rails data method:
    API Class : DiscoverData
    Method : getCuratedRailList
    Convenient getter method to get curated rail list data.
    Request:
    Requested parameter.
    Nil
    DiscoverData.sharedInstance.getCuratedRailList() {
                    [weak self] discoverCurationData in
                    guard let weakSelf = self else { return }
                    // Success response to handle
                } failure: { [weak self] error, code in
                    guard let weakSelf = self else { return }
                    // Error message to handle
                }
    Response:
    • Response Object : Feed data Model object
    • contentType : content type in the rail
    • itemCount : number of item
    • itemList : item list
    • placement: Placement of the rail in table view
    • position : position of the content
    • railId: rail id
    • railName: rail name to show as a header
    • thumbnailUrl: thumbnail url to show with content
    • type : type of rail
  • Get Curated Rail detail by Rail Id data method:
    API Class : DiscoverData
    Method : getCuratedRailDetails
    Convenient getter method to get curated rail detail detail by rail id list data.
    Request:
    Requested parameter.
    Nil
    DiscoverData.sharedInstance.getCuratedRailDetails(railId: railId) { [weak self] (curationDataSeeAllModel) in
                    guard let weakSelf = self else { return }
                    // Response success Handle
                } failure: { [weak self] (error, code) in
                    guard let weakSelf = self else { return }
                    // Handle Error message
                }
    Response:
    • Response Object : Feed data Model object
    • contentType: content type in the rail
    • itemCount : number of item
    • itemList: item list
    • placement : Placement of the rail in table view
    • position : position of the content
    • railId : rail id
    • railName : rail name to show as a header
    • thumbnailUrl : thumbnail url to show with content
    • type : Type of rail
  • Get Searched Challenges list data method:
    API Class : DiscoverData
    Method : getSearchedChallengesList
    Convenient getter method to get searched challenges list data.
    Request:
    Requested parameter.
    title: "Title of the text"
    limit: number of record in one go
    offset: page number
    DiscoverData.sharedInstance.getSearchedChallengesList(
                    title: searchTextStr,
                    limit: 20,
                    offSet: 1
                ) { [weak self] result in
                    guard let weakSelf = self else { return }
                    // Response handle
                } failure: { error, code in
                    print(error)
                }
    Response:
    • Response Object : Curation data Model object
    • result : [HashtagCuration]
    • statusMessage : status to handle
    • statusCode: Header status code to handle with response
    • success : success message to print
  • Get Searched Hashtag list data method:
    API Class : DiscoverData
    Method : getSearchedHashtagList
    Convenient getter method to get searched hashtag list data.
    Request:
    Requested parameter.
    title: "Title of the text"
    limit: number of record in one go
    offset: page number
    DiscoverData.sharedInstance.getSearchedHashtagList(
                    title: searchTextStr,
                    limit: 20,
                    offSet: 1
                ) { [weak self] result in
                    guard let weakSelf = self else { return }
                    // Response handle
                } failure: { error, code in
                    print(error)
                }
    Response:
    • Response Object : Curation data Model object
    • Response Object : Curation data Model object
    • result : [HashtagCuration]
    • statusMessage : message for the user
    • statusCode: Header status code to handle with response
    • success : success message to print
  • Get Searched Video list data method:
    API Class : DiscoverData
    Method : getCuratedRailList
    Convenient getter method to get searched video list data.
    Request:
    Requested parameter.
    SearchedTeext: "Title of the text"
    limit: number of record in one go
    offset: page number
    DiscoverData.sharedInstance.getSearchedVideoList(searchText: searchText, limit: limitVideo, offset: pageOffset, success: {
                    [weak self] result in
                    guard let weakSelf = self else { return }
                    // Searched video list
                }) { [weak self] error, code in
                    guard let weakSelf = self else { return }
                    weakSelf.isLoading = false
                    weakSelf.showAlertClosureWithError?(error, code)
                }
    Response:
    • Response Object : Curation data Model object
    • result : [DiscoverAllVideosData]
    • statusMessage : message for the user
    • status: status to handle
    • statusCode: Header status code to handle with response
    • success : success message to print
  • Get Searched User list data method:
    API Class : DiscoverData
    Method : getSearchedUserList
    Convenient getter method to get searched user list data.
    Request:
    Requested parameter.
    SearchedTeext: "Title of the text"
    limit: number of record in one go
    offset: page number
    DiscoverData.sharedInstance.getSearchedUserList(searchText: searchText) { [weak self] result in
                    guard let weakSelf = self else { return }
                    // video list response to handle
                } failure: { [weak self] error, code in
                    guard let weakSelf = self else { return }
                    // Error handle
                }
    Response:
    • Response Object : Curation data Model object
    • result : [UserData]
    • statusMessage : message for the user
    • status: status to handle
    • statusCode: Header status code to handle with response
    • success : success message to print