valcommentClient=SportsTalk247.CommentClient(config=ClientConfig(appId="c84cb9c852932a6b0411e75e",// This is just a sample app idapiToken="5MGq3XbsspBEQf3kj154_OSQV-jygEKwHJyuHjuAeWHA",// This is just a sample tokenendpoint="http://api.custom.endpoint/v3/"// This is just a sample API endpoint))
Below is a code sample on how to use this SDK feature:
// Launch thru coroutine block// https://developer.android.com/topic/libraries/architecture/coroutineslifecycleScope.launch{// Switch to IO Coroutine Context(Operation will be executed on IO Thread)valcreatedConversation=withContext(Dispatchers.IO){commentClient.createOrUpdateConversation(request=CreateOrUpdateConversationRequest(conversationid="test-conversation-id123",property="sportstalk247.com/apidemo",moderation="post",enableprofanityfilter=false,title="Sample Conversation",open=true,customid="/articles/2020-03-01/article1/something-very-important-happened"))}// Resolve `createdConversation` from HERE onwards(ex. update UI displaying the response data)...}
valrxDisposeBag=CompositeDisposable()commentClient.createOrUpdateConversation(request=CreateOrUpdateConversationRequest(conversationid="test-conversation-id123",property="sportstalk247.com/apidemo",moderation="post",enableprofanityfilter=false,title="Sample Conversation",open=true,customid="/articles/2020-03-01/article1/something-very-important-happened")).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).doOnSubscribe{rxDisposeBag.add(it)}.subscribe{createdConversation->// Resolve `createdConversation` (ex. Display prompt OR Update UI)}
Below is a code sample on how to use this SDK feature:
// Launch thru coroutine block// https://developer.android.com/topic/libraries/architecture/coroutineslifecycleScope.launch{// Switch to IO Coroutine Context(Operation will be executed on IO Thread)valconversation=withContext(Dispatchers.IO){commentClient.getConversation(conversationid="test-conversation-id123")}// Resolve `conversation` from HERE onwards(ex. update UI displaying the response data)...}
valrxDisposeBag=CompositeDisposable()commentClient.getConversation(conversationid="test-conversation-id123").subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).doOnSubscribe{rxDisposeBag.add(it)}.subscribe{conversation->// Resolve `conversation` (ex. Display prompt OR Update UI)}
Below is a code sample on how to use this SDK feature:
// Launch thru coroutine block// https://developer.android.com/topic/libraries/architecture/coroutineslifecycleScope.launch{// Switch to IO Coroutine Context(Operation will be executed on IO Thread)valconversation=withContext(Dispatchers.IO){commentClient.getConversationByCustomId(customid="/articles/2020-03-01/article1/something-very-important-happened")}// Resolve `conversation` from HERE onwards(ex. update UI displaying the response data)...}
valrxDisposeBag=CompositeDisposable()commentClient.getConversationByCustomId(customid="/articles/2020-03-01/article1/something-very-important-happened").subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).doOnSubscribe{rxDisposeBag.add(it)}.subscribe{conversation->// Resolve `conversation` (ex. Display prompt OR Update UI)}
Below is a code sample on how to use this SDK feature:
// Launch thru coroutine block// https://developer.android.com/topic/libraries/architecture/coroutineslifecycleScope.launch{// Switch to IO Coroutine Context(Operation will be executed on IO Thread)valconversations=withContext(Dispatchers.IO){commentClient.listConversations()}// Resolve `conversations` from HERE onwards(ex. update UI displaying the response data)...}
valrxDisposeBag=CompositeDisposable()commentClient.listConversations().subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).doOnSubscribe{rxDisposeBag.add(it)}.subscribe{conversations->// Resolve `conversations` (ex. Display prompt OR Update UI)}
Invoke this function if you want to retrieve a list of conversations and you want metadata about only those conversations so you can display things like like count or comment count making minimal requests.
Refer to the SportsTalk API Documentation for more details:
Below is a code sample on how to use this SDK feature:
// Launch thru coroutine block// https://developer.android.com/topic/libraries/architecture/coroutineslifecycleScope.launch{// Switch to IO Coroutine Context(Operation will be executed on IO Thread)valbatchOfConversations=withContext(Dispatchers.IO){commentClient.batchGetConversationDetails(ids=listOf("test-conversation-id123","test-conversation-id456","test-conversation-id789"),// [OPTIONAL] List of conversation id(s)cid=listOf("/articles/2020-03-01/article1/something-very-important-happened","/articles/2020-03-01/article1/something-not-so-important-happened","/articles/2020-03-01/article1/something-okayish-happened",),// [OPTIONAL] List of conversation customid(s)entities=listOf("reactions","likecount"),// [OPTIONAL] One of the string constants("reactions", "likecount", or "commentcount"))}// Resolve `batchOfConversations` from HERE onwards(ex. update UI displaying the response data)...}
valrxDisposeBag=CompositeDisposable()commentClient.batchGetConversationDetails(ids=listOf("test-conversation-id123","test-conversation-id456","test-conversation-id789"),// [OPTIONAL] List of conversation id(s)cid=listOf("/articles/2020-03-01/article1/something-very-important-happened","/articles/2020-03-01/article1/something-not-so-important-happened","/articles/2020-03-01/article1/something-okayish-happened",),// [OPTIONAL] List of conversation customid(s)entities=listOf("reactions","likecount"),// [OPTIONAL] One of the string constants("reactions", "likecount", or "commentcount")).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).doOnSubscribe{rxDisposeBag.add(it)}.subscribe{batchOfConversations->// Resolve `batchOfConversations` (ex. Display prompt OR Update UI)}
Invoke this function if you want to either react to the content itself (for example to LIKE an article/video/poll) or you can use the comment react api to react to an individual comment
Refer to the SportsTalk API Documentation for more details:
Below is a code sample on how to use this SDK feature:
// Launch thru coroutine block// https://developer.android.com/topic/libraries/architecture/coroutineslifecycleScope.launch{// Switch to IO Coroutine Context(Operation will be executed on IO Thread)valreactComment=withContext(Dispatchers.IO){commentClient.reactToConversationTopic(conversationid="test-conversation-id123",request=ReactToConversationTopicRequest(userid="test-user-id123",// ID of the User who is attempting to react on the commentreaction=ReactionType.LIKE,// Any arbitratry reaction string constant(i.e. "like", etc.)reacted=true,))}// Resolve `reactComment` from HERE onwards(ex. update UI displaying the response data)...}
valrxDisposeBag=CompositeDisposable()commentClient.reactToConversationTopic(conversationid="test-conversation-id123",request=ReactToConversationTopicRequest(userid="test-user-id123",// ID of the User who is attempting to react on the commentreaction=ReactionType.LIKE,// Any arbitratry reaction string constant(i.e. "like", etc.)reacted=true,)).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).doOnSubscribe{rxDisposeBag.add(it)}.subscribe{reactComment->// Resolve `reactComment` (ex. Display prompt OR Update UI)}
Invoke this function if you want to create a comment and publishes it. You can optionally make this comment into a reply by passing in the optional replyto field. Custom fields can be set, and can be overwritten.
Refer to the SportsTalk API Documentation for more details:
Below is a code sample on how to use this SDK feature:
// Launch thru coroutine block// https://developer.android.com/topic/libraries/architecture/coroutineslifecycleScope.launch{// Switch to IO Coroutine Context(Operation will be executed on IO Thread)valcreatedComment=withContext(Dispatchers.IO){commentClient.createComment(conversationid="test-conversation-id123",request=CreateCommentRequest(userid="test-user-id123",// ID of the User who is attempting to create the commentdisplayname="HelloUser1",// [OPTIONAL] Override display name of the User who is attempting to create the commentbody="Hello, this is my comment!",customtype=null,// [OPTIONAL]customfield1=null,// [OPTIONAL]customfield2=null,// [OPTIONAL]custompayload="{ num: 0 }",// [OPTIONAL]))}// Resolve `createdComment` from HERE onwards(ex. update UI displaying the response data)...}
valrxDisposeBag=CompositeDisposable()commentClient.createComment(conversationid="test-conversation-id123",request=CreateCommentRequest(userid="test-user-id123",// ID of the User who is attempting to create the commentdisplayname="HelloUser1",// [OPTIONAL] Override display name of the User who is attempting to create the commentbody="Hello, this is my comment!",customtype=null,// [OPTIONAL]customfield1=null,// [OPTIONAL]customfield2=null,// [OPTIONAL]custompayload="{ num: 0 }",// [OPTIONAL])).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).doOnSubscribe{rxDisposeBag.add(it)}.subscribe{createdComment->// Resolve `createdComment` (ex. Display prompt OR Update UI)}
Invoke this function if you want to reply to a specific comment. The reply to comment method is the same as the create comment method, except you pass in the ID of the parent comment using the replyto field.
Refer to the SportsTalk API Documentation for more details:
Below is a code sample on how to use this SDK feature:
// Launch thru coroutine block// https://developer.android.com/topic/libraries/architecture/coroutineslifecycleScope.launch{// Switch to IO Coroutine Context(Operation will be executed on IO Thread)valcommentReply=withContext(Dispatchers.IO){commentClient.replyToComment(conversationid="test-conversation-id123",replyto="test-comment-id123",// ID of the comment you are about to reply torequest=CreateCommentRequest(userid="test-user-id123",// ID of the User who is attempting to create the commentdisplayname="HelloUser1",// [OPTIONAL] Override display name of the User who is attempting to create the commentbody="Hello, this is my comment!",customtype=null,// [OPTIONAL]customfield1=null,// [OPTIONAL]customfield2=null,// [OPTIONAL]custompayload="{ num: 0 }",// [OPTIONAL]))}// Resolve `commentReply` from HERE onwards(ex. update UI displaying the response data)...}
valrxDisposeBag=CompositeDisposable()commentClient.replyToComment(conversationid="test-conversation-id123",replyto="test-comment-id123",// ID of the comment you are about to reply torequest=CreateCommentRequest(userid="test-user-id123",// ID of the User who is attempting to create the commentdisplayname="HelloUser1",// [OPTIONAL] Override display name of the User who is attempting to create the commentbody="Hello, this is my comment!",customtype=null,// [OPTIONAL]customfield1=null,// [OPTIONAL]customfield2=null,// [OPTIONAL]custompayload="{ num: 0 }",// [OPTIONAL])).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).doOnSubscribe{rxDisposeBag.add(it)}.subscribe{commentReply->// Resolve `commentReply` (ex. Display prompt OR Update UI)}
Invoke this function if you want to retrieve a list of replies from a specific comment. This method works the same way as the List Comments method, so view the documentation on that method.
The difference is that this method will filter to only include comments that have a parent.
Refer to the SportsTalk API Documentation for more details:
Below is a code sample on how to use this SDK feature:
// Launch thru coroutine block// https://developer.android.com/topic/libraries/architecture/coroutineslifecycleScope.launch{// Switch to IO Coroutine Context(Operation will be executed on IO Thread)valcommentReplies=withContext(Dispatchers.IO){commentClient.listReplies(conversationid="test-conversation-id123",commentid="test-comment-id123",// ID of the parent commentcursor=null,// OPTIONALlimit=null,// OPTIONALdirection=null,// OPTIONAL, defaults to "forward", Must be "forward" or "backward"sort=null,// OPTIONAL, defaults to "oldest", Either "oldest", "newest", "likes", "votescore", "mostreplies"includechildren=true,// (optional, default is false) If false, this returns all reply nodes that are immediate children of the provided parent id. If true, it includes all replies under the parent id and all the children of those replies and so on.includeinactive=true,// (optional, default is false) If true, return comments that are inactive (for example, disabled by moderation))}// Resolve `commentReplies` from HERE onwards(ex. update UI displaying the response data)...}
valrxDisposeBag=CompositeDisposable()commentClient.listReplies(conversationid="test-conversation-id123",commentid="test-comment-id123",// ID of the parent commentcursor=null,// OPTIONALlimit=null,// OPTIONALdirection=null,// OPTIONAL, defaults to "forward", Must be "forward" or "backward"sort=null,// OPTIONAL, defaults to "oldest", Either "oldest", "newest", "likes", "votescore", "mostreplies"includechildren=true,// (optional, default is false) If false, this returns all reply nodes that are immediate children of the provided parent id. If true, it includes all replies under the parent id and all the children of those replies and so on.includeinactive=true,// (optional, default is false) If true, return comments that are inactive (for example, disabled by moderation)).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).doOnSubscribe{rxDisposeBag.add(it)}.subscribe{commentReplies->// Resolve `commentReplies` (ex. Display prompt OR Update UI)}
Below is a code sample on how to use this SDK feature:
// Launch thru coroutine block// https://developer.android.com/topic/libraries/architecture/coroutineslifecycleScope.launch{// Switch to IO Coroutine Context(Operation will be executed on IO Thread)valcomment=withContext(Dispatchers.IO){commentClient.getComment(commentid="test-comment-id123",)}// Resolve `comment` from HERE onwards(ex. update UI displaying the response data)...}
valrxDisposeBag=CompositeDisposable()commentClient.getComment(commentid="test-comment-id123",).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).doOnSubscribe{rxDisposeBag.add(it)}.subscribe{comment->// Resolve `comment` (ex. Display prompt OR Update UI)}
Below is a code sample on how to use this SDK feature:
// Launch thru coroutine block// https://developer.android.com/topic/libraries/architecture/coroutineslifecycleScope.launch{// Switch to IO Coroutine Context(Operation will be executed on IO Thread)valcomments=withContext(Dispatchers.IO){commentClient.listComments(conversationid="test-conversation-id123",cursor=null,// OPTIONALlimit=null,// OPTIONALdirection=null,// OPTIONAL, defaults to "forward", Must be "forward" or "backward"sort=null,// OPTIONAL, defaults to "oldest", Either "oldest", "newest", "likes", "votescore", "mostreplies"includechildren=true,// (optional, default is false) If false, this returns all reply nodes that are immediate children of the provided parent id. If true, it includes all replies under the parent id and all the children of those replies and so on.includeinactive=true,// (optional, default is false) If true, return comments that are inactive (for example, disabled by moderation))}// Resolve `comments` from HERE onwards(ex. update UI displaying the response data)...}
valrxDisposeBag=CompositeDisposable()commentClient.listComments(conversationid="test-conversation-id123",cursor=null,// OPTIONALlimit=null,// OPTIONALdirection=null,// OPTIONAL, defaults to "forward", Must be "forward" or "backward"sort=null,// OPTIONAL, defaults to "oldest", Either "oldest", "newest", "likes", "votescore", "mostreplies"includechildren=true,// (optional, default is false) If false, this returns all reply nodes that are immediate children of the provided parent id. If true, it includes all replies under the parent id and all the children of those replies and so on.includeinactive=true,// (optional, default is false) If true, return comments that are inactive (for example, disabled by moderation)).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).doOnSubscribe{rxDisposeBag.add(it)}.subscribe{comments->// Resolve `comments` (ex. Display prompt OR Update UI)}
Below is a code sample on how to use this SDK feature:
// Launch thru coroutine block// https://developer.android.com/topic/libraries/architecture/coroutineslifecycleScope.launch{// Switch to IO Coroutine Context(Operation will be executed on IO Thread)valbatchCommentReplies=withContext(Dispatchers.IO){commentClient.listRepliesBatch(conversationid="test-conversation-id123",cursor=null,// OPTIONALchildlimit=50,// (Optional, default = 50).parentids=listOf("test-comment-id123","test-comment-id456"),// (Required). A list of parent comment ID(s) to which comment replies will be fetched from.includeinactive=true,// (optional, default is false) If true, return comments that are inactive (for example, disabled by moderation))}// Resolve `batchCommentReplies` from HERE onwards(ex. update UI displaying the response data)...}
valrxDisposeBag=CompositeDisposable()commentClient.listRepliesBatch(conversationid="test-conversation-id123",cursor=null,// OPTIONALchildlimit=50,// (Optional, default = 50).parentids=listOf("test-comment-id123","test-comment-id456"),// (Required). A list of parent comment ID(s) to which comment replies will be fetched from.includeinactive=true,// (optional, default is false) If true, return comments that are inactive (for example, disabled by moderation)).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).doOnSubscribe{rxDisposeBag.add(it)}.subscribe{batchCommentReplies->// Resolve `batchCommentReplies` (ex. Display prompt OR Update UI)}
Below is a code sample on how to use this SDK feature:
// Launch thru coroutine block// https://developer.android.com/topic/libraries/architecture/coroutineslifecycleScope.launch{// Switch to IO Coroutine Context(Operation will be executed on IO Thread)valreactedComment=withContext(Dispatchers.IO){commentClient.reactToComment(conversationid="test-conversation-id123",commentid="test-comment-id123"request=ReactToCommentRequest(userid="test-user-id123",// ID of the User who is attempting to react on the commentreaction=ReactionType.LIKE,// Any arbitratry reaction string constant(i.e. "like", etc.)reacted=true,))}// Resolve `reactedComment` from HERE onwards(ex. update UI displaying the response data)...}
valrxDisposeBag=CompositeDisposable()commentClient.reactToComment(conversationid="test-conversation-id123",commentid="test-comment-id123"request=ReactToCommentRequest(userid="test-user-id123",// ID of the User who is attempting to react on the commentreaction=ReactionType.LIKE,// Any arbitratry reaction string constant(i.e. "like", etc.)reacted=true,)).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).doOnSubscribe{rxDisposeBag.add(it)}.subscribe{reactedComment->// Resolve `reactedComment` (ex. Display prompt OR Update UI)}
Below is a code sample on how to use this SDK feature:
// Launch thru coroutine block// https://developer.android.com/topic/libraries/architecture/coroutineslifecycleScope.launch{// Switch to IO Coroutine Context(Operation will be executed on IO Thread)valvotedComment=withContext(Dispatchers.IO){commentClient.voteOnComment(conversationid="test-conversation-id123",commentid="test-comment-id123"request=VoteOnCommentRequest(vote=VoteType.Up,userid="test-user-id123",// ID of the User who is attempting to vote on the comment))}// Resolve `votedComment` from HERE onwards(ex. update UI displaying the response data)...}
valrxDisposeBag=CompositeDisposable()commentClient.voteOnComment(conversationid="test-conversation-id123",commentid="test-comment-id123"request=VoteOnCommentRequest(vote=VoteType.Up,userid="test-user-id123",// ID of the User who is attempting to vote on the comment)).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).doOnSubscribe{rxDisposeBag.add(it)}.subscribe{votedComment->// Resolve `votedComment` (ex. Display prompt OR Update UI)}
Below is a code sample on how to use this SDK feature:
// Launch thru coroutine block// https://developer.android.com/topic/libraries/architecture/coroutineslifecycleScope.launch{// Switch to IO Coroutine Context(Operation will be executed on IO Thread)valreportedComment=withContext(Dispatchers.IO){commentClient.reportComment(conversationid="test-conversation-id123",commentid="test-comment-id123"request=ReportCommentRequest(userid="test-user-id123",// ID of the User who is attempting to report the commentreporttype=ReportType.ABUSE,))}// Resolve `reportedComment` from HERE onwards(ex. update UI displaying the response data)...}
valrxDisposeBag=CompositeDisposable()commentClient.reportComment(conversationid="test-conversation-id123",commentid="test-comment-id123"request=ReportCommentRequest(userid="test-user-id123",// ID of the User who is attempting to report the commentreporttype=ReportType.ABUSE,)).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).doOnSubscribe{rxDisposeBag.add(it)}.subscribe{reportedComment->// Resolve `reportedComment` (ex. Display prompt OR Update UI)}
Below is a code sample on how to use this SDK feature:
// Launch thru coroutine block// https://developer.android.com/topic/libraries/architecture/coroutineslifecycleScope.launch{// Switch to IO Coroutine Context(Operation will be executed on IO Thread)valupdatedComment=withContext(Dispatchers.IO){commentClient.updateComment(conversationid="test-conversation-id123",commentid="test-comment-id123"request=UpdateCommentRequest(userid="test-user-id123",// ID of the User who is attempting to update the commentbody="Hello UPDATED comment!",))}// Resolve `updatedComment` from HERE onwards(ex. update UI displaying the response data)...}
valrxDisposeBag=CompositeDisposable()commentClient.updateComment(conversationid="test-conversation-id123",commentid="test-comment-id123"request=UpdateCommentRequest(userid="test-user-id123",// ID of the User who is attempting to update the commentbody="Hello UPDATED comment!",)).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).doOnSubscribe{rxDisposeBag.add(it)}.subscribe{updatedComment->// Resolve `updatedComment` (ex. Display prompt OR Update UI)}
Below is a code sample on how to use this SDK feature:
// Launch thru coroutine block// https://developer.android.com/topic/libraries/architecture/coroutineslifecycleScope.launch{// Switch to IO Coroutine Context(Operation will be executed on IO Thread)vallogicallyDeletedComment=withContext(Dispatchers.IO){commentClient.flagCommentLogicallyDeleted(conversationid="test-conversation-id123",commentid="test-comment-id123"userid="test-user-id123",// ID of the User who is attempting to logically delete the commentdeleted=true,permanentifnoreplies=false,// If not provided, defaults to false.)}// Resolve `logicallyDeletedComment` from HERE onwards(ex. update UI displaying the response data)...}
valrxDisposeBag=CompositeDisposable()commentClient.flagCommentLogicallyDeleted(conversationid="test-conversation-id123",commentid="test-comment-id123"userid="test-user-id123",// ID of the User who is attempting to logically delete the commentdeleted=true,permanentifnoreplies=false,// If not provided, defaults to false.).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).doOnSubscribe{rxDisposeBag.add(it)}.subscribe{logicallyDeletedComment->// Resolve `logicallyDeletedComment` (ex. Display prompt OR Update UI)}
Below is a code sample on how to use this SDK feature:
// Launch thru coroutine block// https://developer.android.com/topic/libraries/architecture/coroutineslifecycleScope.launch{// Switch to IO Coroutine Context(Operation will be executed on IO Thread)valdeletedComment=withContext(Dispatchers.IO){commentClient.permanentlyDeleteComment(conversationid="test-conversation-id123",commentid="test-comment-id123",)}// Resolve `deletedComment` from HERE onwards(ex. update UI displaying the response data)...}
valrxDisposeBag=CompositeDisposable()commentClient.permanentlyDeleteComment(conversationid="test-conversation-id123",commentid="test-comment-id123",).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).doOnSubscribe{rxDisposeBag.add(it)}.subscribe{deletedComment->// Resolve `deletedComment` (ex. Display prompt OR Update UI)}
Below is a code sample on how to use this SDK feature:
// Launch thru coroutine block// https://developer.android.com/topic/libraries/architecture/coroutineslifecycleScope.launch{// Switch to IO Coroutine Context(Operation will be executed on IO Thread)valcommentsInModerationQueue=withContext(Dispatchers.IO){commentClient.listCommentsInModerationQueue(conversationid="test-conversation-id123",// OPTIONAL, limit to comments under specified conversation IDlimit=null,// OPTIONALcursor=null,// OPTIONALfilterHandle=null,// OPTIONALfilterKeyword=null,// OPTIONALfilterModerationState=CommentFilterModerationState.Approved,// OPTIONAL)}// Resolve `commentsInModerationQueue` from HERE onwards(ex. update UI displaying the response data)...}
valrxDisposeBag=CompositeDisposable()commentClient.listCommentsInModerationQueue(conversationid="test-conversation-id123",// OPTIONAL, limit to comments under specified conversation IDlimit=null,// OPTIONALcursor=null,// OPTIONALfilterHandle=null,// OPTIONALfilterKeyword=null,// OPTIONALfilterModerationState=CommentFilterModerationState.Approved,// OPTIONAL).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).doOnSubscribe{rxDisposeBag.add(it)}.subscribe{commentsInModerationQueue->// Resolve `commentsInModerationQueue` (ex. Display prompt OR Update UI)}
Below is a code sample on how to use this SDK feature:
// Launch thru coroutine block// https://developer.android.com/topic/libraries/architecture/coroutineslifecycleScope.launch{// Switch to IO Coroutine Context(Operation will be executed on IO Thread)valapprovedComment=withContext(Dispatchers.IO){commentClient.approveMessageInQueue(commentid="test-comment-id123",request=ApproveMessageRequest(approve=true// Set true to APPROVE. Otherwise, false to REJECT.))}// Resolve `approvedComment` from HERE onwards(ex. update UI displaying the response data)...}
valrxDisposeBag=CompositeDisposable()commentClient.approveMessageInQueue(commentid="test-comment-id123",request=ApproveMessageRequest(approve=true// Set true to APPROVE. Otherwise, false to REJECT.)).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).doOnSubscribe{rxDisposeBag.add(it)}.subscribe{approvedComment->// Resolve `approvedComment` (ex. Display prompt OR Update UI)}
Comment Client
Create / Update Conversation
Invoke this function if you want to create or update a conversation.
Refer to the SportsTalk API Documentation for more details:
https://apiref.sportstalk247.com/?version=latest#e0a0a63c-6e68-49d4-ab5c-b6c19a173f06
Below is a code sample on how to use this SDK feature:
Get Conversation by ID
Invoke this function if you want to retrieve metadata about a conversation.
Refer to the SportsTalk API Documentation for more details:
https://apiref.sportstalk247.com/?version=latest#b23cafdf-35ce-4edc-b073-1215595a9de0
Below is a code sample on how to use this SDK feature:
Find Conversation by CustomID
Invoke this function if you want to retrieve the conversation object by using the CustomID for the conversation supplied by the app.
Refer to the SportsTalk API Documentation for more details:
https://apiref.sportstalk247.com/?version=latest#5c85f5cb-8bd0-4a9d-b78f-165bfc31a724
Below is a code sample on how to use this SDK feature:
List Conversations
Invoke this function if you want to Get a list of all conversations with optional filters.
Refer to the SportsTalk API Documentation for more details:
https://apiref.sportstalk247.com/?version=latest#dd62cc9e-c3be-4826-831d-40783531adb4
Below is a code sample on how to use this SDK feature:
Batch Get Conversation Details
Invoke this function if you want to retrieve a list of conversations and you want metadata about only those conversations so you can display things like like count or comment count making minimal requests.
Refer to the SportsTalk API Documentation for more details:
https://apiref.sportstalk247.com/?version=latest#7d249f48-de31-4647-9102-527c64fe37bb
Below is a code sample on how to use this SDK feature:
React To Conversation Topic (”Like”)
Invoke this function if you want to either react to the content itself (for example to LIKE an article/video/poll) or you can use the comment react api to react to an individual comment
Refer to the SportsTalk API Documentation for more details:
https://apiref.sportstalk247.com/?version=latest#e25d90d0-9a4b-4a45-839f-0242f960c6b3
Below is a code sample on how to use this SDK feature:
Create and Publish Comment
Invoke this function if you want to create a comment and publishes it. You can optionally make this comment into a reply by passing in the optional replyto field. Custom fields can be set, and can be overwritten.
Refer to the SportsTalk API Documentation for more details:
https://apiref.sportstalk247.com/?version=latest#1a6e6c69-c904-458e-ac87-c215091db098
Below is a code sample on how to use this SDK feature:
List Replies
Invoke this function if you want to retrieve a list of replies from a specific comment. This method works the same way as the List Comments method, so view the documentation on that method. The difference is that this method will filter to only include comments that have a parent.
Refer to the SportsTalk API Documentation for more details:
https://apiref.sportstalk247.com/?version=latest#71e7a205-471a-4554-9897-da45a8b671ee
Below is a code sample on how to use this SDK feature:
Get Comment by ID
Invoke this function if you want to retrieve a specific comment.
Refer to the SportsTalk API Documentation for more details:
https://apiref.sportstalk247.com/?version=latest#b7c10a98-f5cd-4ed5-8fcc-aa3440cd4233
Below is a code sample on how to use this SDK feature:
List Comments
Invoke this function if you want to Get a list of comments within a conversation.
Refer to the SportsTalk API Documentation for more details:
https://apiref.sportstalk247.com/?version=latest#98744685-35c9-4293-a082-594cb7a6ec76
Below is a code sample on how to use this SDK feature:
List Replies Batch
Invoke this function if you want to get a list of replies to multiple parent comments quickly, in 1 request.
Refer to the SportsTalk API Documentation for more details:
https://apiref.sportstalk247.com/?version=latest#b2d397cf-5d25-4752-b96e-71374b4799bb
Below is a code sample on how to use this SDK feature:
React To Comment (”Like”)
Invoke this function if you want to add or remove a reaction to a comment.
Refer to the SportsTalk API Documentation for more details:
https://apiref.sportstalk247.com/?version=latest#df659fc4-0bb8-4d93-845d-c61579a1f0f8
Below is a code sample on how to use this SDK feature:
Vote on Comment
Invoke this function if you want to UPVOTE, DOWNVOTE, or REMOVE VOTE from a comment.
Refer to the SportsTalk API Documentation for more details:
https://apiref.sportstalk247.com/?version=latest#82ffbc3a-01fe-4f1d-a7b1-62440179dfa5
Below is a code sample on how to use this SDK feature:
Report Comment
Invoke this function if you want to REPORT a comment to the moderation team.
Refer to the SportsTalk API Documentation for more details:
https://apiref.sportstalk247.com/?version=latest#8b48a6e4-8fda-4a3d-b172-f4db50fb0a40
Below is a code sample on how to use this SDK feature:
Update Comment
Invoke this function if you want to UPDATE the contents of an existing comment.
Refer to the SportsTalk API Documentation for more details:
https://apiref.sportstalk247.com/?version=latest#b02ee426-5a84-4203-93b4-989ad43fe227
Below is a code sample on how to use this SDK feature:
Flag Comment As Deleted
Invoke this function if you want to logically delete comment(body becomes “(comment deleted)” and deleted = true).
Refer to the SportsTalk API Documentation for more details:
https://apiref.sportstalk247.com/?version=latest#5e14e5ea-e8b6-46e0-9cb8-263f695ea652
Below is a code sample on how to use this SDK feature:
Delete Comment (permanent)
Invoke this function if you want to DELETE a comment and all replies to that comment.
Refer to the SportsTalk API Documentation for more details:
https://apiref.sportstalk247.com/?version=latest#2b353c85-c5b7-4065-a14d-3960976f91a6
Below is a code sample on how to use this SDK feature:
List Comments in Moderation Queue
Invoke this function if you want to list all the comments in the moderation queue.
Refer to the SportsTalk API Documentation for more details:
https://apiref.sportstalk247.com/?version=latest#d98100c4-6be8-415c-9c08-f6bcbc039566
Below is a code sample on how to use this SDK feature:
Approve Message in Queue
Invoke this function if you want to APPROVE/REJECT a message in the moderation queue.
Refer to the SportsTalk API Documentation for more details:
https://apiref.sportstalk247.com/?version=latest#71eb7668-f9d1-4ecf-9e07-1f64699ff071
Below is a code sample on how to use this SDK feature: