Method | Method detail |
---|---|
getCuratedTopRail() | Convenient getter to get top curated top Profiles. |
getFeedData() | Convenient getter to get top curated top Profiles. |
getVideoLikeCount() | Convenient getter to get all liked status against the video list which we are passing as parameter. |
Requested parameter:
Placement : determine where to use top profile curated data (Home/Discover)
// Call Top Profile API method on feed view controller
FeedData.sharedInstance.getCuratedTopRail(success: { topProfiles in
print(topProfiles)
//topProfiles.success
// topProfiles.data // Will return an top profile data array which can be used for user data bindings on controller
// topProfiles.message // Can be use message with method on Alert
}, failure: { error,arg in
print(error)
// Action for Fail
})
// Call feed API method on feed view controller
// //Requested parameter.
// Search: Pass the search string on which user wanted to get his feed list
// limit: pass the record limit which you wanted to generate your UI. Type: Int
// offSet: pass the paging offset value. Type: Int
FeedData.sharedInstance.getFeedData(search: "", limit: 20, offset: 1) {response in
print(response.total as Any)
print(response)
// var result = response.data
// weakSelf.dispatchGroup.leave()
} failure: {(error, code) in
print(error)
print(code)
// Action to Fail
}
Requested parameter.
videoIds: pass An Array of Videos ID which you wanted to get that you have liked this ID or not.
// Call Video like list API method to get Video is liked or not by logged in user
FeedData.sharedInstance.getVideosLikeCount(videoIds: [ids]) { result in
print("\(result.data)")
/*
result.statusCode
result.success
result.message
// List of Like Video ids
result.data
*/
} failure: { error, code in
print("\(error) - \(code)")