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 Topics in Yammer



Overview

The following operations allow you to work with topics. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with topics, see Sample configuration

OperationDescription

getMessageById

Retrieves the feed of messages.

getTopicByIdRetrieves the users that have used the topic.

Operation details

This section provides further details on the operations related to topics.

Retrieving the feed of messages

The getMessageById operation retrieves the feed of messages of a topic.

getMessageById
<yammer.getMessageById>
	<topicId>{$ctx:topicId}</topicId>
</yammer.getMessageById>
Properties
  • topicId: The ID of a topic.
Sample request

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

Sample Request for getMessageById
{
	"apiUrl":"https://www.yammer.com",
	"apiToken":"pw3U7vPLe3oK0Cyj9wgKeg",
	"responseType":"json",
	"topicId":"6399334"
}
Related Yammer documentation
https://developer.yammer.com/restapi/#rest-messages

Retrieving the users that have used the topic

The getTopicById operation retrieves the users that have used the topic. 

getTopicById
<yammer.getTopicById>
	<topicId>{$ctx:topicId}</topicId>
</yammer.getTopicById>
Properties
  • topicId: The unique identifier of a topic.
Sample request

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

Sample Request for getTopicById
{
	"apiUrl":"https://www.yammer.com",
	"apiToken":"pw3U7vPLe3oK0Cyj9wgKeg",
	"responseType":"json",
	"topicId":"6399334"
}
Related Yammer documentation
https://developer.yammer.com/restapi/#rest-messages

Sample configuration

Following is a sample proxy service that illustrates how to connect to Yammer with the init operation and use the getMessageById operation. The sample request for this proxy can be found in the getMessageById sample request. You can use this sample as a template for using other operations in this category.

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="yammer_getMessageById"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence onError="faultHandlerSeq">
         <property name="apiUrl" expression="json-eval($.apiUrl)"/>
         <property name="apiToken" expression="json-eval($.apiToken)"/>
         <property name="responseType" expression="json-eval($.responseType)"/>
         <property name="topicId" expression="json-eval($.topicId)"/>
         <yammer.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <apiToken>{$ctx:apiToken}</apiToken>
            <responseType>{$ctx:responseType}</responseType>
         </yammer.init>
         <yammer.getMessageById>
            <topicId>{$ctx:topicId}</topicId>
         </yammer.getMessageById>
         <respond/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>