Method | Method detail |
---|---|
getTimeLineVideoList() | Convenient getter method to get timeline video list record set. |
getTimeLineDetails() | Convenient getter timeline detail record set. |
updateContentLike() | Convenient setter to set user interaction activity with video information. |
postContentShareEvent() | Convenient setter to set user interaction activity with video information. The tracked events are listed below. Share |
getContentCommentList() | Convenient getter to get comment list on selected feed. |
postContentComment() | Convenient setter to post new comments on video. |
updateContentComment() | Convenient setter to delete the comments on video. |
deleteContentComment() | Convenient setter to delete the comment on video. |
getCommentReplyList() | Convenient setter to delete the comment on video. |
Requested parameter.
event: event type
limit: limit for the record set
offset: page offset
ActivityTimeLine.sharedInstance.getTimeLineVideoList(
event: event,
limit: limit,
offset: offset )
{ [weak self] response in
guard let weakSelf = self else { return }
} failure: { [weak self] error in
guard let weakSelf = self else { return }
}
Requested parameter. - Nil
ActivityTimeLine.sharedInstance.getTimeLineDetails { [weak self] response in
guard let weakSelf = self else { return }
context?.setHeaderData(TimeLineHeaderData: response?.result)
weakSelf.didGetDetails()
} failure: { [weak self] error in
guard let weakSelf = self else { return }
weakSelf.didGetError(errDesc:error)
}
Requested parameter.
assetsId: pass the assets id for like and unlike the event
Like: Bool value to send True for Like and False for Unlike
feedModel: FeedModel to send which we get from the feed list
/*
//eventActionParam
like
unlike
*/
ActivityTimeLine.sharedInstance.updateContentLike(assetId: “assetId”, like: isLike, feedModel: nil) {(likeObject) in
print(likeObject)
} failure: { (error, code) in
print(error)
}
Requested parameter.
assetsId: pass the assets id for like and unlike the event
feedModel: FeedModel to send which we get from the feed list
ActivityTimeLine.sharedInstance.postContentViewEvent(assetId: assetId,
feedModel: model) { [weak self] (eventAction) in
guard let weakSelf = self else { return }
if eventAction.success == true {
let viewCount = ((model?.viewsCount ?? 0) + 1)
weakSelf.sawPlayerPresentor?.updatedLikeComment(likes: "", comments: "", isLikeByMe: false, shares: "", views: String(viewCount))
}
} failure: { [weak self] (error, code) in
guard let weakSelf = self else { return }
weakSelf.sawPlayerPresentor?.failure(error: error)
}
Requested parameter.
videoTopicId : pass content topic id value to get list of all paginated comments record associeated with that content.
limit : pass the record limit which you wanted to generate your UI. Type: Int
offSet: pass the paging offset value. Type: Int
ActivityTimeLine.sharedInstance.getContentCommentList(
topicId: topicId,
limit: limit,
offSet: offSet,
sort: true
) { commentModel in
/*
commentModel.success
commentModel.message
commentModel.status
commentModel.perPage
commentModel.page
// Comment List
commentModel.commentsData
// Comment Details
commentModel.commentsData[0].fullName
commentModel.commentsData[0].descriptionField
commentModel.commentsData[0].createdAt
*/
} failure: { error, code in
print("\(error) - \(code)")
}
Requested parameter.
assetsId: pass the assets id for like and unlike the event
feedModel: FeedModel to send which we get from the feed list
Description: text of the comment
postID : if new pass the nil value.
ActivityTimeLine.sharedInstance.postContentComment(assetId: assetId,
description: commentDescription,
feedModel: feedModel,
postId: postId) { [weak self] response in
self?.isLoading = false
if response.success == false{
self?.didFailed?()
}
// Success handle
} failure: { [weak self] (error, code) in
self?.isLoading = false
//Error message
}
Requested parameter.
assetsId: pass the assets id for like and unlike the event
feedModel: FeedModel to send which we get from the feed list
Description: text of the comment
postID : if new pass the nil value.
CommentRefId : comment ref id to pass the comment id which you wanted to update
ActivityTimeLine.sharedInstance.updateContentComment(
assetId: assetId,
postId: String(postId),
commentRefId: String(commentRefId),
description: commentDescription
) { [weak self] response in
guard let weakSelf = self else { return }
// Response handle
} failure: { [weak self] error, code in
guard let weakSelf = self else { return }
// Error handle
}
Requested parameter.
assetsId: pass the assets id for like and unlike the event
feedModel: FeedModel to send which we get from the feed list
postID : if new pass the nil value.
CommentRefId : comment ref id to pass the comment id which you wanted to update
ActivityTimeLine.sharedInstance.deleteContentComment(
assetId: assetId,
postId: String(postId),
commentRefId: String(commentRefrenceId)
) { [weak self] response in
// Handle response
} failure: { [weak self] (error, code) in
// Error handle
}
Requested parameter.
postID : post id which you wanted to get reply comment list.
limit : total number of record which you wanted to get in one response
offset: page number
ActivityTimeLine.sharedInstance.getCommentReplyList(postId: postId, limit: repliedLimit, offSet: reply.pageOffset ?? 1) { [weak self] result in
guard let weakSelf = self else { return }
// Handle repsonse
} failure: { [weak self] error, code in
guard let weakSelf = self else { return }
// Handle error
}