org.mule.modules

mule-module-twitter

config

Namespacehttp://www.mulesoft.org/schema/mule/twitter
Schema Locationhttp://www.mulesoft.org/schema/mule/twitter/current/mule-twitter.xsd  (View Schema)
Schema Version2.4
Minimum Mule Version3.2

Module Overview

Twitter is an online social networking service and microblogging service that enables its users to send and read text-based posts of up to 140 characters, known as "tweets".

Summary

Configuration
<twitter:config>
Configure an instance of this module
Message Sources
<twitter:filtered-stream>
Asynchronously retrieves public statuses that match one or more filter predicates.
<twitter:firehose-stream>
Asynchronously retrieves all public statuses.
<twitter:link-stream>
Asynchronously retrieves all statuses containing 'http:' and 'https:'.
<twitter:sample-stream>
Asynchronously retrieves a random sample of all public statuses.
<twitter:site-stream>
Asynchronously retrieves statutes for a set of supplied user's ids.
<twitter:user-stream>
Retrieves the following user updates notifications:
- New Statuses
- Block/Unblock events
- Follow events
- User profile updates
- Retweets
- List creation/deletion
- List member addition/remotion
- List subscription/unsubscription
- List updates
- Profile updates

Such notifications are represented as org.mule.twitter.UserEvent objects

Only one Twitter stream can be consumed using the same credentials.

Message Processors
<twitter:create-place>
Creates a new place at the given latitude and longitude.
<twitter:destroy-status>
Destroys the status specified by the required ID parameter.
<twitter:get-available-trends>
Returns the sorted locations that Twitter has trending topic information for.
<twitter:get-daily-trends>
Returns the top 20 trending topics for each hour in a given day.
<twitter:get-geo-details>
Find out more details of a place that was returned from the reverseGeoCode operation.
<twitter:get-home-timeline>
Returns the 20 most recent statuses, including retweets, posted by the authenticating user and that user's friends.
<twitter:get-location-trends>
Returns the top 10 trending topics for a specific location Twitter has trending topic information for.
<twitter:get-mentions>
Returns the 20 most recent mentions (status containing @username) for the authenticating user.
<twitter:get-public-timeline>
Returns the 20 most recent statuses from non-protected users who have set a custom user icon.
<twitter:get-retweeted-by>
Show user objects of up to 100 members who retweeted the status.
<twitter:get-retweeted-by-i-ds>
Show user ids of up to 100 users who retweeted the status represented by id
This method calls http://api.twitter.com/1/statuses/:id/retweeted_by/ids.format

<twitter:get-retweeted-by-me>
Returns the 20 most recent retweets posted by the authenticating user.
<twitter:get-retweeted-by-user-by-screen-name>
Returns the 20 most recent retweets posted by the specified user.
<twitter:get-retweeted-by-user-by-user-id>
Returns the 20 most recent retweets posted by the specified user.
<twitter:get-retweeted-to-me>
Returns the 20 most recent retweets posted by the authenticating user's friends.
<twitter:get-retweeted-to-user-by-screen-name>
Returns the 20 most recent retweets posted by users the specified user follows.
<twitter:get-retweeted-to-user-by-user-id>
Returns the 20 most recent retweets posted by users the specified user follows.
<twitter:get-retweets>
Returns up to 100 of the first retweets of a given tweet.
<twitter:get-retweets-of-me>
Returns the 20 most recent tweets of the authenticated user that have been retweeted by others.
<twitter:get-user-timeline>
Returns the 20 most recent statuses posted from the authenticating user.
<twitter:get-user-timeline-by-screen-name>
Returns the 20 most recent statuses posted from the authenticating user.
<twitter:get-user-timeline-by-user-id>
Returns the 20 most recent statuses posted from the authenticating user.
<twitter:get-weekly-trends>
Returns the top 30 trending topics for each day in a given week.
<twitter:request-authorization>
Start the OAuth request authorization process.
<twitter:retweet-status>
Retweets a tweet.
<twitter:reverse-geo-code>
Search for places (cities and neighborhoods) that can be attached to a statuses/update.
<twitter:search>
Returns tweets that match a specified query.
<twitter:search-places>
Search for places that can be attached to a statuses/update.
<twitter:send-direct-message-by-screen-name>
Sends a new direct message to the specified user from the authenticating user.
<twitter:send-direct-message-by-user-id>
Sends a new direct message to the specified user from the authenticating user.
<twitter:set-oauth-verifier>
Set the OAuth verifier after it has been retrieved via requestAuthorization.
<twitter:show-status>
Returns a single status, specified by the id parameter below.
<twitter:show-user>
Answers user information for the authenticated user

<twitter:update-status>
Updates the authenticating user's status.

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:twitter="http://www.mulesoft.org/schema/mule/twitter"
      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/twitter
               http://www.mulesoft.org/schema/mule/twitter/current/mule-twitter.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 necessary 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 ValueDescriptionJava TypeMIME TypeEncoding
xs:string name Optional. Give a name to this configuration so it can be later referenced.
xs:string accessKey Optional. The access key provided by Twitter
xs:string accessSecret Optional. The access secret provided by Twitter
xs:string consumerKey The consumer key used by this application
xs:string consumerSecret The consumer key secret by this application
xs:string proxyHost Optional. Proxy host
xs:string proxyPassword Optional. Proxy password
xs:int proxyPort -1 Optional. Proxy port
xs:string proxyUsername Optional. Proxy username
xs:boolean useSSL true Optional. Whether to use SSL in API calls to Twitter

Message Processors

<twitter:create-place>

Creates a new place at the given latitude and longitude.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
placeName The placeName a place is known as. String */* UTF-8
containedWithin The place_id within which the new place can be found. Try and be as close as possible with the containing place. For example, for a room in a building, set the contained_within as the building place_id. String */* UTF-8
token The token found in the response from geo/similar_places. String */* UTF-8
latitude The latitude the place is located at. Double */*
longitude The longitude the place is located at. Double */*
streetAddress Optional. Optional: This parameter searches for places which have this given street address. There are other well-known, and application specific attributes available. Custom attributes are also permitted. Learn more about Place Attributes. String */* UTF-8
Returns
Return Type Description
Place a new Place
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:destroy-status>

Destroys the status specified by the required ID parameter.
Usage note: The authenticating user must be the author of the specified status.
This method calls http://api.twitter.com/1/statuses/destroy

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
statusId The ID of the status to destroy. long */*
Returns
Return Type Description
Status the deleted Status
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-available-trends>

Returns the sorted locations that Twitter has trending topic information for. The response is an array of "locations" that encode the location's WOEID (a Yahoo! Where On Earth ID) and some other human-readable information such as a canonical name and country the location belongs in.
The available trend locations will be sorted by distance to the lat and long passed in. The sort is nearest to furthest.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
latitude Optional. The latitude Double */*
longitude Optional. The longitude Double */*
Returns
Return Type Description
ResponseList<Location> the Locations
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-daily-trends>

Returns the top 20 trending topics for each hour in a given day.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
date Optional. Starting date of daily trends. If no date is specified, current date is used Date */*
excludeHashTags false Optional. Whether hashtags should be excluded boolean */*
Returns
Return Type Description
List<Trends> a list of Trends objects
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-geo-details>

Find out more details of a place that was returned from the reverseGeoCode operation.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
id The ID of the location to query about. String */* UTF-8
Returns
Return Type Description
Place a Place
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-home-timeline>

Returns the 20 most recent statuses, including retweets, posted by the authenticating user and that user's friends. This is the equivalent of /timeline/home on the Web.
Usage note: This home_timeline call is identical to statuses/friends_timeline, except that home_timeline also contains retweets, while statuses/friends_timeline does not for backwards compatibility reasons. In a future version of the API, statuses/friends_timeline will be deprected and replaced by home_timeline.
This method calls http://api.twitter.com/1/statuses/home_timeline

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
page 1 Optional. Specifies the page of results to retrieve. int */*
count 100 Optional. Specifies the number of records to retrieve. Must be less than or equal to 200. int */*
sinceId -1 Optional. Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available. long */*
Returns
Return Type Description
ResponseList<Status> list of Status of the home Timeline
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-location-trends>

Returns the top 10 trending topics for a specific location Twitter has trending topic information for. The response is an array of "trend" objects that encode the name of the trending topic, the query parameter that can be used to search for the topic on Search, and the direct URL that can be issued against Search. This information is cached for five minutes, and therefore users are discouraged from querying these endpoints faster than once every five minutes. Global trends information is also available from this API by using a WOEID of 1.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
woeid 1 Optional. The WOEID of the location to be querying for int */*
Returns
Return Type Description
Trends trends
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-mentions>

Returns the 20 most recent mentions (status containing @username) for the authenticating user.
This method calls http://api.twitter.com/1/statuses/mentions

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
page 1 Optional. Specifies the page of results to retrieve. int */*
count 100 Optional. Specifies the number of tweets to try and retrieve, up to a maximum of 200. The value of count is best thought of as a limit to the number of tweets to return because suspended or deleted content is removed after the count has been applied. int */*
sinceId -1 Optional. Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available. long */*
Returns
Return Type Description
ResponseList<Status> the 20 most recent mentions (Status containing @username) for the authenticating user.
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-public-timeline>

Returns the 20 most recent statuses from non-protected users who have set a custom user icon. The public timeline is cached for 60 seconds and requesting it more often than that is unproductive and a waste of resources.
This method calls http://api.twitter.com/1/statuses/public_timeline

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
Returns
Return Type Description
ResponseList<Status> list of Status of the Public Timeline
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-retweeted-by>

Show user objects of up to 100 members who retweeted the status.
This method calls http://api.twitter.com/1/statuses/:id/retweeted_by

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
statusId The ID of the status you want to get retweeters of long */*
page 1 Optional. Specifies the page of results to retrieve. int */*
count 100 Optional. Specifies the number of tweets to try and retrieve, up to a maximum of 200. The value of count is best thought of as a limit to the number of tweets to return because suspended or deleted content is removed after the count has been applied. int */*
sinceId -1 Optional. Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available. long */*
Returns
Return Type Description
ResponseList<User> the list of User who retweeted your status
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-retweeted-by-i-ds>

Show user ids of up to 100 users who retweeted the status represented by id
This method calls http://api.twitter.com/1/statuses/:id/retweeted_by/ids.format

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
statusId The ID of the status you want to get retweeters of long */*
page 1 Optional. Specifies the page of results to retrieve. int */*
count 100 Optional. Specifies the number of tweets to try and retrieve, up to a maximum of 200. The value of count is best thought of as a limit to the number of tweets to return because suspended or deleted content is removed after the count has been applied. int */*
sinceId -1 Optional. Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available. long */*
Returns
Return Type Description
IDs IDs of users who retweeted the stats
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-retweeted-by-me>

Returns the 20 most recent retweets posted by the authenticating user.
This method calls http://api.twitter.com/1/statuses/retweeted_by_me

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
page 1 Optional. Specifies the page of results to retrieve. int */*
count 100 Optional. Specifies the number of tweets to try and retrieve, up to a maximum of 200. The value of count is best thought of as a limit to the number of tweets to return because suspended or deleted content is removed after the count has been applied. int */*
sinceId -1 Optional. Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available. long */*
Returns
Return Type Description
ResponseList<Status> the 20 most recent retweets (Status) posted by the authenticating user
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-retweeted-by-user-by-screen-name>

Returns the 20 most recent retweets posted by the specified user. This method is identical to statuses/retweeted_by_me except you can choose the user to view.
This method has not been finalized and the interface is subject to change in incompatible ways.
This method calls http://api.twitter.com/1/statuses/retweeted_by_user

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
screenName The user to view String */* UTF-8
page 1 Optional. Specifies the page of results to retrieve. int */*
count 100 Optional. Specifies the number of tweets to try and retrieve, up to a maximum of 200. The value of count is best thought of as a limit to the number of tweets to return because suspended or deleted content is removed after the count has been applied. int */*
sinceId -1 Optional. Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available. long */*
Returns
Return Type Description
ResponseList<Status> the 20 most recent retweets (Status) posted by the authenticating user
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-retweeted-by-user-by-user-id>

Returns the 20 most recent retweets posted by the specified user. This method is identical to statuses/retweeted_by_me except you can choose the user to view.
This method has not been finalized and the interface is subject to change in incompatible ways.
This method calls http://api.twitter.com/1/statuses/retweeted_by_user

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The user to view long */*
page 1 Optional. Specifies the page of results to retrieve. int */*
count 100 Optional. Specifies the number of tweets to try and retrieve, up to a maximum of 200. The value of count is best thought of as a limit to the number of tweets to return because suspended or deleted content is removed after the count has been applied. int */*
sinceId -1 Optional. Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available. long */*
Returns
Return Type Description
ResponseList<Status> the 20 most recent retweets (Status) posted by the authenticating user
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-retweeted-to-me>

Returns the 20 most recent retweets posted by the authenticating user's friends.
This method calls http://api.twitter.com/1/statuses/retweeted_to_me

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
page 1 Optional. Specifies the page of results to retrieve. int */*
count 100 Optional. Specifies the number of tweets to try and retrieve, up to a maximum of 200. The value of count is best thought of as a limit to the number of tweets to return because suspended or deleted content is removed after the count has been applied. int */*
sinceId -1 Optional. Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available. long */*
Returns
Return Type Description
ResponseList<Status> the 20 most recent retweets (Status) posted by the authenticating user's friends.
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-retweeted-to-user-by-screen-name>

Returns the 20 most recent retweets posted by users the specified user follows. This method is identical to statuses/retweeted_to_me except you can choose the user to view.
This method has not been finalized and the interface is subject to change in incompatible ways.
This method calls http://api.twitter.com/1/statuses/retweeted_to_user

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
screenName The user to view String */* UTF-8
page 1 Optional. Specifies the page of results to retrieve. int */*
count 100 Optional. Specifies the number of tweets to try and retrieve, up to a maximum of 200. The value of count is best thought of as a limit to the number of tweets to return because suspended or deleted content is removed after the count has been applied. int */*
sinceId -1 Optional. Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available. long */*
Returns
Return Type Description
ResponseList<Status> the 20 most recent retweets (Status) posted by the authenticating user's friends.
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-retweeted-to-user-by-user-id>

Returns the 20 most recent retweets posted by users the specified user follows. This method is identical to statuses/retweeted_to_me except you can choose the user to view.
This method has not been finalized and the interface is subject to change in incompatible ways.
This method calls http://api.twitter.com/1/statuses/retweeted_to_user

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The user to view long */*
page 1 Optional. Specifies the page of results to retrieve. int */*
count 100 Optional. Specifies the number of tweets to try and retrieve, up to a maximum of 200. The value of count is best thought of as a limit to the number of tweets to return because suspended or deleted content is removed after the count has been applied. int */*
sinceId -1 Optional. Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available. long */*
Returns
Return Type Description
ResponseList<Status> the 20 most recent retweets (Status) posted by the authenticating user's friends.
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-retweets>

Returns up to 100 of the first retweets of a given tweet.
This method calls http://api.twitter.com/1/statuses/retweets

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
statusId The numerical ID of the tweet you want the retweets of. long */*
Returns
Return Type Description
ResponseList<Status> the retweets (Status) of a given tweet
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-retweets-of-me>

Returns the 20 most recent tweets of the authenticated user that have been retweeted by others.
This method calls http://api.twitter.com/1/statuses/retweets_of_me

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
page 1 Optional. Specifies the page of results to retrieve. int */*
count 100 Optional. Specifies the number of tweets to try and retrieve, up to a maximum of 200. The value of count is best thought of as a limit to the number of tweets to return because suspended or deleted content is removed after the count has been applied. int */*
sinceId -1 Optional. Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available. long */*
Returns
Return Type Description
ResponseList<Status> the 20 most recent tweets (Status)of the authenticated user that have been retweeted by others.
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-user-timeline>

Returns the 20 most recent statuses posted from the authenticating user. It's also possible to request another user's timeline via the id parameter.
This is the equivalent of the Web / page for your own user, or the profile page for a third party.
For backwards compatibility reasons, retweets are stripped out of the user_timeline when calling in XML or JSON (they appear with 'RT' in RSS and Atom). If you'd like them included, you can merge them in from statuses retweeted_by_me.

This method calls http://api.twitter.com/1/statuses/user_timeline.json

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
page 1 Optional. Specifies the page of results to retrieve. int */*
count 100 Optional. Specifies the number of tweets to try and retrieve, up to a maximum of 200. The value of count is best thought of as a limit to the number of tweets to return because suspended or deleted content is removed after the count has been applied. int */*
sinceId -1 Optional. Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available. long */*
Returns
Return Type Description
ResponseList<Status> list of Status the user Timeline
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-user-timeline-by-screen-name>

Returns the 20 most recent statuses posted from the authenticating user. It's also possible to request another user's timeline via the id parameter.
This is the equivalent of the Web / page for your own user, or the profile page for a third party.
For backwards compatibility reasons, retweets are stripped out of the user_timeline when calling in XML or JSON (they appear with 'RT' in RSS and Atom). If you'd like them included, you can merge them in from statuses retweeted_by_me.

This method calls http://api.twitter.com/1/statuses/user_timeline.json

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
screenName The screen name of the user for whom to return results for String */* UTF-8
page 1 Optional. Specifies the page of results to retrieve. int */*
count 100 Optional. Specifies the number of tweets to try and retrieve, up to a maximum of 200. The value of count is best thought of as a limit to the number of tweets to return because suspended or deleted content is removed after the count has been applied. int */*
sinceId -1 Optional. Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available. long */*
Returns
Return Type Description
ResponseList<Status> list of Status of the user Timeline
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-user-timeline-by-user-id>

Returns the 20 most recent statuses posted from the authenticating user. It's also possible to request another user's timeline via the id parameter.
This is the equivalent of the Web / page for your own user, or the profile page for a third party.
For backwards compatibility reasons, retweets are stripped out of the user_timeline when calling in XML or JSON (they appear with 'RT' in RSS and Atom). If you'd like them included, you can merge them in from statuses retweeted_by_me.

This method calls http://api.twitter.com/1/statuses/user_timeline.json

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId Specifies the ID of the user for whom to return the user_timeline long */*
page 1 Optional. Specifies the page of results to retrieve. int */*
count 100 Optional. Specifies the number of tweets to try and retrieve, up to a maximum of 200. The value of count is best thought of as a limit to the number of tweets to return because suspended or deleted content is removed after the count has been applied. int */*
sinceId -1 Optional. Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available. long */*
Returns
Return Type Description
ResponseList<Status> list of Status of the user Timeline
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:get-weekly-trends>

Returns the top 30 trending topics for each day in a given week.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
date Optional. Starting date of daily trends. If no date is specified, current date is used Date */*
excludeHashTags false Optional. If all hashtags should be removed from the trends list. boolean */*
Returns
Return Type Description
List<Trends> a list of Trends objects
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:request-authorization>

Start the OAuth request authorization process.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
callbackUrl Optional. The url to be requested when the user authorizes this app String */* UTF-8
Returns
Return Type Description
String The user authorization URL.
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:retweet-status>

Retweets a tweet. Returns the original tweet with retweet details embedded.
This method calls http://api.twitter.com/1/statuses/retweet

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
statusId The ID of the status to retweet. long */*
Returns
Return Type Description
Status the retweeted Status
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:reverse-geo-code>

Search for places (cities and neighborhoods) that can be attached to a statuses/update. Given a latitude and a longitude, return a list of all the valid places that can be used as a place_id when updating a status. Conceptually, a query can be made from the user's location, retrieve a list of places, have the user validate the location he or she is at, and then send the ID of this location up with a call to statuses/update.
There are multiple granularities of places that can be returned -- "neighborhoods", "cities", etc. At this time, only United States data is available through this method.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
latitude Optional. Latitude coordinate. Mandatory if ip is not specified Double */*
longitude Optional. Longitude coordinate. Double */*
ip Optional. The ip. Mandatory if coordinates are not specified String */* UTF-8
Returns
Return Type Description
ResponseList<Place> a ResponseList of Place
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:search>

Returns tweets that match a specified query.

This method calls http://search.twitter.com/search.json

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
query The search query. String */* UTF-8
lang Optional. Restricts tweets to the given language, given by an ISO 639-1 code String */* UTF-8
locale Optional. Specify the language of the query you are sending (only ja is currently effective). This is intended for language-specific clients and the default should work in the majority of cases. String */* UTF-8
maxId Optional. If specified, returns tweets with status ids less than the given id Long */*
rpp Optional. Sets the number of tweets to return per page, up to a max of 100 Integer */*
page Optional. Sets the page number (starting at 1) to return, up to a max of roughly 1500 results Integer */*
since Optional. If specified, returns tweets since the given date. Date should be formatted as YYYY-MM-DD String */* UTF-8
sinceId Optional. Returns tweets with status ids greater than the given id. Long */*
geocode Optional. A String containing the latitude and longitude separated by ','. Used to get the tweets by users located within a given radius of the given latitude/longitude, where the user's location is taken from their Twitter profile String */* UTF-8
radius Optional. The radius to be used in the geocode -ONLY VALID IF A GEOCODE IS GIVEN- String */* UTF-8
unit mi Optional. The unit of measurement of the given radius. Can be 'mi' or 'km'. Miles by default. String */* UTF-8
until Optional. If specified, returns tweets with generated before the given date. Date should be formatted as YYYY-MM-DD String */* UTF-8
resultType Optional. If specified, returns tweets included popular or real time or both in the responce. Both by default. Can be 'mixed', 'popular' or 'recent'. String */* UTF-8
Returns
Return Type Description
QueryResult the QueryResult
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:search-places>

Search for places that can be attached to a statuses/update. Given a latitude and a longitude pair, or and IP address, this request will return a list of all the valid places that can be used as the place_id when updating a status.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
latitude Optional. Latitude coordinate. Mandatory if ip is not specified Double */*
longitude Optional. Longitude coordinate. Double */*
ip Optional. The ip. Mandatory if coordinates are not specified String */* UTF-8
Returns
Return Type Description
ResponseList<Place> a ResponseList of Place
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:send-direct-message-by-screen-name>

Sends a new direct message to the specified user from the authenticating user. Requires both the user and text parameters below. The text will be trimmed if the length of the text is exceeding 140 characters.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
screenName The screen name of the user to whom send the direct message String */* UTF-8
message The text of your direct message String */* UTF-8
Returns
Return Type Description
DirectMessage the DirectMessage
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:send-direct-message-by-user-id>

Sends a new direct message to the specified user from the authenticating user. Requires both the user and text parameters below. The text will be trimmed if the length of the text is exceeding 140 characters.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The user ID of the user to whom send the direct message long */*
message The text of your direct message String */* UTF-8
Returns
Return Type Description
DirectMessage the DirectMessage
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:set-oauth-verifier>

Set the OAuth verifier after it has been retrieved via requestAuthorization. The resulting access tokens will be logged to the INFO level so the user can reuse them as part of the configuration in the future if desired.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
oauthVerifier The OAuth verifier code from Twitter. String */* UTF-8
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:show-status>

Returns a single status, specified by the id parameter below. The status's author will be returned inline.
This method calls http://api.twitter.com/1/statuses/show

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
id The numerical ID of the status you're trying to retrieve long */*
Returns
Return Type Description
Status a single Status
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:show-user>

Answers user information for the authenticated user

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
Returns
Return Type Description
User a User object
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

<twitter:update-status>

Updates the authenticating user's status. A status update with text identical to the authenticating user's text identical to the authenticating user's current status will be ignored to prevent duplicates.
This method calls http://api.twitter.com/1/statuses/update

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
status The text of your status update String */* UTF-8
inReplyTo -1 Optional. The ID of an existing status that the update is in reply to. long */*
latitude Optional. The latitude of the location this tweet refers to. This parameter will be ignored unless it is inside the range -90.0 to +90.0 (North is positive) inclusive. Double */*
longitude Optional. He longitude of the location this tweet refers to. The valid ranges for longitude is -180.0 to +180.0 (East is positive) inclusive. This parameter will be ignored if outside that range or if there not a corresponding lat parameter. Double */*
Returns
Return Type Description
Status the latest Status
Exception Payloads
Payload ClassDescription
TwitterException when Twitter service or network is unavailable

Message Sources

<twitter:filtered-stream>

Asynchronously retrieves public statuses that match one or more filter predicates.

At least a keyword or userId must be specified. Multiple parameters may be specified.

Placing long parameters in the URL may cause the request to be rejected for excessive URL length.

The default access level allows up to 200 track keywords and 400 follow userids.

Only one Twitter stream can be consumed using the same credentials. As a consequence, only one twitter stream can be consumed per connector instance.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
count 0 Optional. The number of previous statuses to stream before transitioning to the live stream. int */*
callback The SourceCallback used to dispatch messages when a response is received SourceCallback */*
Child Elements
NameDefault ValueDescriptionJava Type
<twitter:user-ids> Optional. The user ids to follow List<Long>
<twitter:keywords> Optional. The keywords to track List<String>

<twitter:firehose-stream>

Asynchronously retrieves all public statuses. This stream is not generally available - it requires special permissions and its usage is discouraged by Twitter

Only one Twitter stream can be consumed using the same credentials. As a consequence, only one twitter stream can be consumed per connector instance.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
count Indicates the number of previous statuses to consider for delivery before transitioning to live stream delivery. int */*
callback The SourceCallback used to dispatch messageswhen a response is received SourceCallback */*

<twitter:link-stream>

Asynchronously retrieves all statuses containing 'http:' and 'https:'. Like Firehorse, its is not a generally available stream

Only one Twitter stream can be consumed using the same credentials. As a consequence, only one twitter stream can be consumed per connector instance.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
count Indicates the number of previous statuses to consider for delivery before transitioning to live stream delivery. int */*
callback The SourceCallback used to dispatch messages when a response is received SourceCallback */*

<twitter:sample-stream>

Asynchronously retrieves a random sample of all public statuses. The sample size and quality varies depending on the account permissions

The default access level provides a small proportion of the Firehose. The "Gardenhose" access level provides a proportion more suitable for data mining and research applications that desire a larger proportion to be statistically significant sample.

Only one Twitter stream can be consumed using the same credentials. As a consequence, only one twitter stream can be consumed per connector instance.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
callback The SourceCallback used to dispatch messages when a response is received SourceCallback */*

<twitter:site-stream>

Asynchronously retrieves statutes for a set of supplied user's ids. Site Streams are a beta service, so refer always to latest twitter documentation about them.

Only one Twitter stream can be consumed using the same credentials. As a consequence, only one twitter stream can be consumed per connector instance.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
withFollowings false Optional. WithFollowings whether to receive status updates from people following boolean */*
callback_ The SourceCallback used to dispatch messages when a response is received SourceCallback */*
Child Elements
NameDefault ValueDescriptionJava Type
<twitter:user-ids> Ids of users to include in the stream List<Long>

<twitter:user-stream>

Retrieves the following user updates notifications:
- New Statuses
- Block/Unblock events
- Follow events
- User profile updates
- Retweets
- List creation/deletion
- List member addition/remotion
- List subscription/unsubscription
- List updates
- Profile updates

Such notifications are represented as org.mule.twitter.UserEvent objects

Only one Twitter stream can be consumed using the same credentials. As a consequence, only one twitter stream can be consumed per connector instance.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
callback_ The SourceCallback used to dispatch messages when a response is received SourceCallback */*
Child Elements
NameDefault ValueDescriptionJava Type
<twitter:keywords> The keywords to track for new statuses List<String>

Transformers