Get Challenge Detail:
API Class :
discover
Method :
getChallengeDetails
Convenient getter to get challenge detail recordset.
Request:
public func getChallengeDetails(challenge: String,
limit: Int,
offset: Int,
success: @escaping (DetailViewData?) -> (),
failure: @escaping (String?, Int?) -> ()) -> ()
Requested parameter:
Hashtag : hashtag which you wanted to get detail
Limit: limit of the recordset which you wanted to get from API response
offset : offset page number index
Response:
-
Response Object :
Curated Discover Rail Model Object
- Keys which object have:
-
hashtag :
HashtagChallengeModel?
-
classField :
class field
-
id :
Id to use further
-
backgroundImage :
background image for the hashtag detail screen
-
bannerImage :
banner image
-
createdAt :
Timestamp to recoeginaiose the created date and
time
-
createdBy :
Userid who has created
-
createdTimestamp :
Timestamp to recoeginaiose the created date and
time
-
descriptionField :
description of the hashtag
-
hashtagId :
hashtag id
-
image :
hashtag image
-
isChallenge :
is this hashtag is challenge
-
status :
Status of hashtag
-
taggedVideos :
[UserData]?
-
title :
title of the content
-
updatedAt :
Timestamp to recoeginaiose the created date and
time
-
updatedTimestamp :
Timestamp to recoeginaiose the created date and
time
-
videoCount :
Count of video
-
videos :
[FeedModel]?
-
hashtagTitles :
hashtag title
-
shareCount :
share cound of hashtag
-
id :
Id for further to use
-
categoryId :
Category ID
-
commentCount :
cound of comment on video
-
createdAt :
Timestamp to recoeginaiose the created date and
time
-
descriptionField :
description field
-
follow :
is follow
-
likeCount :
like count
-
s3Url :
s3 URL for further video binding
-
soundId :
sound id
-
soundUrl :
sound url
-
title :
title of the video
-
type :
type
-
updatedAt :
Timestamp to recoeginaiose the created date and
time
-
taggedUsers :
[UserData]?
-
user :
UserData?
-
userId :
userid
-
thumbnailUrl :
thumbnail to bind with uiimageview
-
videoId :
Video Id
-
viewsCount :
View count on the video
-
topicId :
Topic id from comment list
-
duration :
cusration of the video
-
hashtags :
[HashtagChallengeModel]?
-
contentType :
content type (Video/Image)
-
contentUrls :
Content URL for multi size feed
-
downloadUrl :
URL to download the content
-
height :
height of the video
-
width :
width of the video
-
videoUrls :
[String]?
-
shoppable :
is shoppable
-
products :
[ShoppableProduct]?
-
videoIsLike :
is like on video
-
status :
Status
-
challenge :
HashtagChallengeModel?
-
classField :
class field
-
id :
id of the content
-
backgroundImage :
Background image to bind with UIImageView
-
bannerImage :
banner image to bind with uiimageview
-
createdAt :
Timestamp to recoeginaiose the created date and
time
-
createdBy :
crated user name
-
createdTimestamp :
Timestamp to recoeginaiose the created date and
time
-
descriptionField :
description
-
hashtagId :
hashtag ID
-
image :
Image of the video tag with selected hashtag
-
isChallenge :
is challenge
-
status :
Status
-
taggedVideos :
[UserData]?
-
title :
Title video
-
updatedAt :
Timestamp to recoeginaiose the created date and
time
-
updatedTimestamp :
Timestamp to recoeginaiose the created date and
time
-
videoCount :
video count
How to call?
Detail.sharedInstance.getChallengeDetails(challenge: context.getFilterId(),
limit: context.getPageSize(),
offset: context.getPageOffset()) { [weak self] result in
// result.data
self?.didGetDetails()
} failure: { [weak self] (error, code) in
guard let weakSelf = self else { return }
weakSelf.didGetError(errDesc: error ?? "")
}