org.mule.modules

mule-module-yammer

2.3
Namespacehttp://www.mulesoft.org/schema/mule/yammer
Schema Locationhttp://www.mulesoft.org/schema/mule/yammer/2.0/mule-yammer.xsd
Version2.0
Minimum Mule Version3.2

Module Overview

Connector for Yammer related functions. Yammer is a social-network-like internal corporate communications system, where users are able to post messages, follow users, images and so on in a manner like Facebook or Twitter. This connector allows to:

  • Retrieve messages
  • Retrieve received messages
  • Retrieve private messages
  • Retrieve sent messages

It's necessary to set in yammer (https://www.yammer.com/client_applications where you can create an application or edit it) the next Callback URL:

http://{host}:{port}/yammerCodeRetrievingPath

where the {host} is the same host as the Website of the yammer application.

Then you have to configure yammer:

<http:connector name="connector.http.mule.default" enableCookies="true" keepAlive="true" />

<yammer:config consumerKey="${consumerKey}" consumerSecret="${consumerSecret}">
<yammer:http-callback-config domain="{host}" remotePort="SOME_PORT" localPort="{port}" />
</yammer:config>

where {host} and {port} are the same of the Callback URL used before.


Summary

Configuration
<yammer:config>
Configure an instance of this module
Message Processors
<yammer:get-following-messages>
Answers the list of messages followed by the logged-in user.
<yammer:get-messages>
Answers all messages in this network.
<yammer:get-private-messages>
Answers the whole list of private Messages (aka Direct Messages) for the logged-in user.
<yammer:get-received-messages>
Answers the list of messages received by the logged-in user.
<yammer:get-sent-messages>
Answers the whole list of messages sent by the current user.

Configuration

To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:

<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:yammer="http://www.mulesoft.org/schema/mule/yammer"
      xsi:schemaLocation="
               http://www.mulesoft.org/schema/mule/core
               http://www.mulesoft.org/schema/mule/core/current/mule.xsd
               http://www.mulesoft.org/schema/mule/yammer
               http://www.mulesoft.org/schema/mule/yammer/2.0/mule-yammer.xsd">

      <!-- here goes your flows and configuration elements -->

</mule>

This module is configured using the config element. This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necesary as long as each carries its own name.

Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to specify which configuration to use.

Attributes
TypeNameDefault ValueDescription
xs:string name Optional. Give a name to this configuration so it can be later referenced.
xs:string consumerKey The OAuth consumer key
xs:string consumerSecret The OAuth consumer secret
xs:boolean debug false Optional. If connector should be run in debug mode.

Message Processors

<yammer:get-following-messages>

Answers the list of messages followed by the logged-in user. Corresponds to the "My Feed" tab on the website.

XML Sample
INCLUDE_ERROR

Attributes
config-ref Optional. Specify which configuration to use.
accessToken OAuth access token
retryMax 1 Optional. Specify how many times this operation can be retried automatically
Child Elements
Return Payload

<yammer:get-messages>

Answers all messages in this network. Corresponds to the "Company Feed" tab on the website.

XML Sample
INCLUDE_ERROR

Attributes
config-ref Optional. Specify which configuration to use.
accessToken OAuth access token
retryMax 1 Optional. Specify how many times this operation can be retried automatically
Child Elements
Return Payload

<yammer:get-private-messages>

Answers the whole list of private Messages (aka Direct Messages) for the logged-in user. Corresponds to the "Direct Messages" section on the website.

XML Sample
INCLUDE_ERROR

Attributes
config-ref Optional. Specify which configuration to use.
accessToken OAuth access token
retryMax 1 Optional. Specify how many times this operation can be retried automatically
Child Elements
Return Payload

<yammer:get-received-messages>

Answers the list of messages received by the logged-in user. Corresponds to the "Received" tab on the website.

XML Sample
INCLUDE_ERROR

Attributes
config-ref Optional. Specify which configuration to use.
accessToken OAuth access token
retryMax 1 Optional. Specify how many times this operation can be retried automatically
Child Elements
Return Payload

<yammer:get-sent-messages>

Answers the whole list of messages sent by the current user. Corresponds to the "Sent" tab on the website.

XML Sample
INCLUDE_ERROR

Attributes
config-ref Optional. Specify which configuration to use.
accessToken OAuth access token
retryMax 1 Optional. Specify how many times this operation can be retried automatically
Child Elements
Return Payload