Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
titlecreateThread
 <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: The ID of the Disqus forum to retrieve.
  • title: The title of the thread to create.
  • categoryId: The ID of the category to create the thread in.
  • url: The URL (defined by RFC 3986).
  • date: The UNIX time stamp (or ISO date time standard).
  • message: The message to put in the created thread.
  • identifier: An identifier. Maximum length of 300.
  • slug: The alpha-numeric slug.

...

Code Block
languagexml
titlegetThreadDetails
<disqus.getThreadDetails>
    <forumId>{$ctx:forumId}</forumId>
    <related>{$ctx:related}</related>
	<threadId>{$ctx:threadId}</threadId>
</disqus.getThreadDetails>
Properties
  • forumId:  The ID of the Disqus forum to retrieve the thread from.
  • related:  Specifies relations to include with your response: "forum", "author", and/or "category".
  • threadId:  The ID of the thread to retrieve.

...

Code Block
languagexml
titlelistThreads
<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:  The ID of the category whose threads should be retrieved.
  • forumId:  The ID of the Disqus forum to retrieve.
  • threadId:  The ID of the thread to retrieve.
  • since:  The UNIX time stamp (or ISO date time standard).
  • related:  Specifies relations to include with your response: "forum" and/or "author".
  • cursor:  The pagination parameter.
  • limit:  The maximum number of posts to return.
  • include: The types of thread to include: "open", "closed", and/or "killed".
  • order:  The order of entries returned: "ASC" or "DESC" (default).

...

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:

...

EP 2 endpoint:

...

EP 3 endpoint:

Sample request

Following is a sample REST/JSON request that can be handled by the  listThreads operation.

...

Code Block
languagexml
titlesubscribe
<disqus.subscribe>
    <threadId>{$ctx:threadId}</threadId>
    <email>{$ctx:email}</email>
	<subscribe>{$ctx:subscribe}</subscribe>
</disqus.subscribe>
Properties

...

Code Block
languagexml
titleSample Proxy
<?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>