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/.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »



Overview

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

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

OperationDescription

1Working with Groups in Yammer

Joins a group.

1Working with Groups in YammerLeaves a joined group.

Operation details

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

Joining a group

The joinGroup operation joins a group.

joinGroup
 <yammer.joinGroup>
 	<groupId>{$ctx:groupId}</groupId>
 </yammer.joinGroup>
Properties
  • groupId: The ID of the group.
Sample request

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

Sample Request for joinGroup
{
	"apiUrl":"https://www.yammer.com",
	"apiToken":"uewmZGcC18LOvwYfCRSbPA",
	"responseType":"xml",
	"groupId":"4976430"
}
Related Yammer documentation
https://developer.yammer.com/restapi/#rest-groups

Leaving a joined group

The leaveGroup operation leaves a joined group.

leaveGroup
<yammer.leaveGroup>
	<groupId>{$ctx:groupId}</groupId>
</yammer.leaveGroup>
Properties
  • groupid: The ID of the group.
Sample request

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

Sample Request for leaveGroup
{
	"apiUrl":"https://www.yammer.com",
	"apiToken":"uewmZGcC18LOvwYfCRSbPA",
	"responseType":"xml",
	"groupId":"4976430"
}
Related Yammer documentation
https://developer.yammer.com/restapi/#rest-groups

Sample configuration

Following is a sample proxy service that illustrates how to connect to Yammer with the init operation and use the joinGroup operation. The sample request for this proxy can be found in the joinGroup 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_joinGroup"
       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="groupId" expression="json-eval($.groupId)"/>
         <yammer.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <apiToken>{$ctx:apiToken}</apiToken>
            <responseType>{$ctx:responseType}</responseType>
         </yammer.init>
         <yammer.joinGroup>
            <groupId>{$ctx:groupId}</groupId>
         </yammer.joinGroup>
         <respond/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>                                                                                           
  • No labels