[ Overview ] [ Operation details ] [ Sample configuration ]
OverviewThe following operations allow you to work with Private Messages 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 Private Messages scope, see Sample configuration.
Anchor |
---|
| OperationDetails |
---|
| OperationDetails |
---|
|
Operation detailsThis section provides the details on each operation related to Private Messages scope.
Anchor |
---|
| getUserInboxMessages |
---|
| getUserInboxMessages |
---|
|
Get information of a user inbox messagesTo retrieves the inbox messages of the user, use <reddit.getUserInboxMessages> operation.
Code Block |
---|
title | Sample Request for getAnAlbumMetadata |
---|
|
<reddit.init>
<accessToken>{$ctx:accessToken}</accessToken>
</reddit.init>
<reddit.getUserInboxMessages>
<after>{$ctx:after}</after>
<before>{$ctx:before}</before>
<count>{$ctx:count}</count>
<mark>{$ctx:mark}</mark>
<limit>{$ctx:limit}</limit>
<show>{$ctx:show}</show>
<mid>{$ctx:mid}</mid>
<srDetail>{$ctx:srDetail}</srDetail>
</reddit.getUserInboxMessages> |
Anchor |
---|
| getUserSentMessagesInfo |
---|
| getUserSentMessagesInfo |
---|
|
Get information of a user sent messagesTo retrieves the sent messages of the user, use <reddit.getUserSentMessagesInfo> operation.
Code Block |
---|
title | Sample Request for getAnAlbumMetadata |
---|
|
<reddit.init>
<accessToken>{$ctx:accessToken}</accessToken>
</reddit.init>
<reddit.getUserSentMessagesInfo>
<after>{$ctx:after}</after>
<before>{$ctx:before}</before>
<count>{$ctx:count}</count>
<mark>{$ctx:mark}</mark>
<limit>{$ctx:limit}</limit>
<show>{$ctx:show}</show>
<mid>{$ctx:mid}</mid>
<srDetail>{$ctx:srDetail}</srDetail>
</reddit.getUserSentMessagesInfo> |
Anchor |
---|
| getUserNotifications |
---|
| getUserNotifications |
---|
|
Get information of a user notificationsTo retrieves the notifications of the user, use <reddit.getUserNotifications> operation.
Code Block |
---|
title | Sample Request for getAnAlbumMetadata |
---|
|
<reddit.init>
<apiUrlOauth>{$ctx:apiUrlOauth}</apiUrlOauth>
<apiVersion>{$ctx:apiVersion}</apiVersion>
<accessToken>{$ctx:accessToken}</accessToken>
</reddit.init>
<reddit.getUserNotifications>
<count>{$ctx:count}</count>
<endDate>{$ctx:endDate}</endDate>
<startDate>{$ctx:startDate}</startDate>
<sort>{$ctx:sort}</sort>
</reddit.getUserNotifications> |
Properties
after: Fullname of a thing(start thing_id of the message)
before: Fullname of a thing
count: A positive integer (default: 0)
mark: A boolean value(true or false)
limit: The maximum number of items desired (default: 25, maximum: 100)
show: Show whether the string all or not
sort: One of (relevance, hot, top, new, comments)
srDetail: Expand subreddits
mid: Mid thing_id of the messages
endDate: End date of the notifications
startDate: Start date of the notifications
Anchor |
---|
| sampleconfiguration |
---|
| sampleconfiguration |
---|
|
Sample configurationFollowing is a sample proxy service that illustrates how to connect to Reddit with the init
operation to use the getUserSentMessagesInfo
operation. The sample request for this proxy can be found in getUserSentMessagesInfo sample request.
Code Block |
---|
|
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="reddit_getUserSentMessagesInfo"
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="mid" expression="json-eval($.mid)"/>
<property name="srDetail" expression="json-eval($.srDetail)"/>
<property name="mark" expression="json-eval($.mark)"/>
<reddit.init>
<accessToken>{$ctx:accessToken}</accessToken>
</reddit.init>
<reddit.getUserSentMessagesInfo>
<after>{$ctx:after}</after>
<before>{$ctx:before}</before>
<count>{$ctx:count}</count>
<mark>{$ctx:mark}</mark>
<limit>{$ctx:limit}</limit>
<show>{$ctx:show}</show>
<mid>{$ctx:mid}</mid>
<srDetail>{$ctx:srDetail}</srDetail>
</reddit.getUserSentMessagesInfo>
<respond/>
</inSequence>
<outSequence>
<log/>
<send/>
</outSequence>
</target>
<description/>
</proxy> |