[ Overview ] [ Operation details ] [ Sample configuration ]
OverviewThe following operations allow you to work with Subredit scope in Reddit. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with Subredit scope, see Sample configuration.
Anchor |
---|
| OperationDetails |
---|
| OperationDetails |
---|
|
Operation detailsThis section provides the details on each operation related to Subreddit scope.
Anchor |
---|
| getUserSubredditInfo |
---|
| getUserSubredditInfo |
---|
|
Get subreddit information of the userTo retrieves the subreddits of the user, use <reddit.getUserSubredditInfo/> operation.
Code Block |
---|
title | Sample Request for getUserSubredditInfo |
---|
|
<reddit.init>
<accessToken>{$ctx:accessToken}</accessToken>
</reddit.init>
<reddit.getUserSubredditInfo/> |
Anchor |
---|
| getSubredditKarma |
---|
| getSubredditKarma |
---|
|
Get subreddit karma points information of the userTo retrieves the subreddits karma points of the user, use <reddit.getSubredditKarma/> operation.
Code Block |
---|
title | Sample Request for getSubredditKarma |
---|
|
<reddit.init>
<apiUrlOauth>{$ctx:apiUrlOauth}</apiUrlOauth>
<apiVersion>{$ctx:apiVersion}</apiVersion>
<accessToken>{$ctx:accessToken}</accessToken>
</reddit.init>
<reddit.getSubredditKarma/> |
Anchor |
---|
| getUserModeratorSubreddit |
---|
| getUserModeratorSubreddit |
---|
|
Get moderator information of the userTo retrieves the moderator information of the user, use <getUserModeratorSubreddit> operation.
Code Block |
---|
title | Sample Request for getUserModeratorSubreddit |
---|
|
<reddit.init>
<accessToken>{$ctx:accessToken}</accessToken>
</reddit.init>
<reddit.getUserModeratorSubreddit>
<after>{$ctx:after}</after>
<before>{$ctx:before}</before>
<count>{$ctx:count}</count>
<limit>{$ctx:limit}</limit>
<show>{$ctx:show}</show>
<srDetail>{$ctx:srDetail}</srDetail>
</reddit.getUserModeratorSubreddit> |
Properties
after: Fullname of a thing
before: Fullname of a thing
count: A positive integer (default: 0)
limit: The maximum number of items desired (default: 25, maximum: 100)
show: Show whether the string all or not
srDetail: Expand subreddits
Anchor |
---|
| sampleconfiguration |
---|
| sampleconfiguration |
---|
|
Sample configurationFollowing is a sample proxy service that illustrates how to connect to Reddit with the init
operation to use the getUserModeratorSubreddit
operation. The sample request for this proxy can be found in getUserModeratorSubreddit sample request.
Code Block |
---|
|
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="reddit_getUserModeratorSubreddit"
transports="https,http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<property name="accessToken" expression="json-eval($.accessToken)"/>
<property name="after" expression="json-eval($.after)"/>
<property name="before" expression="json-eval($.before)"/>
<property name="count" expression="json-eval($.count)"/>
<property name="limit" expression="json-eval($.limit)"/>
<property name="show" expression="json-eval($.show)"/>
<property name="srDetail" expression="json-eval($.srDetail)"/>
<reddit.init>
<accessToken>{$ctx:accessToken}</accessToken>
</reddit.init>
<reddit.getUserModeratorSubreddit>
<after>{$ctx:after}</after>
<before>{$ctx:before}</before>
<count>{$ctx:count}</count>
<limit>{$ctx:limit}</limit>
<show>{$ctx:show}</show>
<srDetail>{$ctx:srDetail}</srDetail>
</reddit.getUserModeratorSubreddit>
<respond/>
</inSequence>
<outSequence>
<log/>
<send/>
</outSequence>
</target>
<description/>
</proxy> |