This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Forums in Disqus
Overview
The following operations allow you to work with forums. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with forums, see Sample configuration.
Operation | Description |
---|---|
Returns forum details. | |
listForumUsers | Returns a list of users. |
Operation details
This section provides further details on the operations related to forums.
Returning forum details
The getForumDetails
operation returns forum details.
<disqus.getForumDetails> <forumId>{$ctx:forumId}</forumId> <related>{$ctx:related}</related> </disqus.getForumDetails>
Properties
The ID of the Disqus forum to retrieve.forumId:
Set to "author" if you want to return information on the author in the response.related:
Sample request
Following is a sample REST/JSON request that can be handled by the getForumDetails
operation.
{ "forumId": "java-ee-forum", "apiUrl": "https://disqus.com", "apiKey": "hNCiYG7sBpsyavTbpysXNgHKJ8YDb9IFr3LpcVGj3eEZTPCicTJxNBoHub4etovu", "related": "author" }
Related Disqus documentation
https://disqus.com/api/docs/forums/details/
Returning a list of users
The listForumUsers operation returns a list of users active within a forum.
<disqus.listForumUsers> <forumId>{$ctx:forumId}</forumId> <cursor>{$ctx:cursor}</cursor> <limit>{$ctx:limit}</limit> <order>{$ctx:order}</order> <sinceId>{$ctx:sinceId}</sinceId> </disqus.listForumUsers>
Properties
The ID of the Disqus forum to retrieve.forumId:
The pagination parameter.cursor:
The maximum number of posts to return.limit:
The order of entries returned: "ASC" or "DESC" (default).order:
Returns users joined since the given date ID.sinceId:
Sample request
Following is a sample REST/JSON request that can be handled by the listForumUsers operation.
{ "limit": "2", "sinceId": "126914282", "cursor": "", "order": "desc", "forumId": "palaforum", "apiUrl": "https://disqus.com", "apiKey": "hNCiYG7sBpsyavTbpysXNgHKJ8YDb9IFr3LpcVGj3eEZTPCicTJxNBoHub4etovu" }
Related Disqus documentation
https://disqus.com/api/docs/forums/listUsers/
Sample configuration
Following is a sample proxy service that illustrates how to connect to Disqus with the init
operation and use the getForumDetails operation. The sample request for this proxy can be found in the getForumDetails sample request. You can use this sample as a template for using other operations in this category.
<?xml version="1.0" encoding="UTF-8"?> <proxy name="disqus_getForumDetails" startOnLoad="true" statistics="disable" trace="disable" transports="https,http" xmlns="http://ws.apache.org/ns/synapse"> <target> <inSequence onError="faultHandlerSeq"> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="apiKey" expression="json-eval($.apiKey)"/> <property name="forumId" expression="json-eval($.forumId)"/> <property name="related" expression="json-eval($.related)"/> <disqus.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiKey>{$ctx:apiKey}</apiKey> </disqus.init> <disqus.getForumDetails> <forumId>{$ctx:forumId}</forumId> <related>{$ctx:related}</related> </disqus.getForumDetails> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>