...
Code Block | ||||
---|---|---|---|---|
| ||||
<disqus.createThread> <forumId>{$ctx:forumId}</forumId> <title>{$ctx:title}</title> <categoryId>{$ctx:categoryId}</categoryId> <url>{$ctx:url}</url> <date>{$ctx:date}</date> <message>{$ctx:message}</message> <identifier>{$ctx:identifier}</identifier> <slug>{$ctx:slug}</slug> </disqus.createThread> |
Properties
forumId:
title:
categoryId:
url:
date:
message:
identifier:
slug:
...
Code Block | ||||
---|---|---|---|---|
| ||||
<disqus.getThreadDetails> <forumId>{$ctx:forumId}</forumId> <related>{$ctx:related}</related> <threadId>{$ctx:threadId}</threadId> </disqus.getThreadDetails> |
Properties
forumId:
related:
threadId:
...
Code Block | ||||
---|---|---|---|---|
| ||||
<disqus.listThreads> <categoryId>{$ctx:categoryId}</categoryId> <forumId>{$ctx:forumId}</forumId> <threadId>{$ctx:threadId}</threadId> <since>{$ctx:since}</since> <related>{$ctx:related}</related> <cursor>{$ctx:cursor}</cursor> <limit>{$ctx:limit}</limit> <include>{$ctx:include}</include> <order>{$ctx:order}</order> </disqus.listThreads> |
Properties
categoryId:
forumId:
threadId:
since:
related:
cursor:
limit:
include:
order:
...
Disqus API used to process listThreads
The
...
Priority | Parameter | EP 1 | EP 2 | EP 3 |
1 | categoryId | provided | - | - |
2 | forumId | * | provided | - |
* Will not be considered when deciding even when a value is supplied in the request. In case of optional parameters, they will be added as they are.
EP 1 endpoint:
Disqus API method that is called to process listThreads
depends on the properties provided in the request, as follows:
- If you specify the category ID, the https://disqus.com/api/3.0/categories/listThreads.json
...
EP 2 endpoint:
- method will be called to process the request
- If you specify the forum ID, the https://disqus.com/api/3.0/forums/listThreads.json
...
EP 3 endpoint:
- method will be called
- If both category and forum IDs are specified, the category ID will take precedence and https://disqus.com/api/3.0/categories/listThreads.json will be called
- If neither category or forum ID is specified, https://disqus.com/api/3.0/trends/listThreads.json will be called.
Sample request
Following is a sample REST/JSON request that can be handled by the
operation. listThreads
...
Code Block | ||||
---|---|---|---|---|
| ||||
<disqus.subscribe> <threadId>{$ctx:threadId}</threadId> <email>{$ctx:email}</email> <subscribe>{$ctx:subscribe}</subscribe> </disqus.subscribe> |
Properties
threadId:
email:
subscribe:
...
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?>
<proxy name="disqus_createThread" 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="accessToken" expression="json-eval($.accessToken)"/>
<property name="forumId" expression="json-eval($.forumId)"/>
<property name="title" expression="json-eval($.title)"/>
<property name="categoryId" expression="json-eval($.categoryId)"/>
<property name="url" expression="json-eval($.url)"/>
<property name="date" expression="json-eval($.date)"/>
<property name="message" expression="json-eval($.message)"/>
<property name="identifier" expression="json-eval($.identifier)"/>
<property name="slug" expression="json-eval($.slug)"/>
<disqus.init>
<apiUrl>{$ctx:apiUrl}</apiUrl>
<apiKey>{$ctx:apiKey}</apiKey>
</disqus.init>
<disqus.createThread>
<accessToken>{$ctx:accessToken}</accessToken>
<forumId>{$ctx:forumId}</forumId>
<title>{$ctx:title}</title>
<categoryId>{$ctx:categoryId}</categoryId>
<url>{$ctx:url}</url>
<date>{$ctx:date}</date>
<message>{$ctx:message}</message>
<identifier>{$ctx:identifier}</identifier>
<slug>{$ctx:slug}</slug>
</disqus.createThread>
<respond/>
</inSequence>
<outSequence>
<send/>
</outSequence>
</target>
<description/>
</proxy> |