Siddhi-io-twitter
The siddhi-io-twitter extension is an extension to Siddhi. It publishes event data from Twitter Applications in the key-value map format.
Prerequisites
- Create a new Twitter application in the Twitter Application Managemet page.
- Open the application you created in step 1 and click on the Permissions tab. In this tab, select the Read and Write option.
- Click on the Keys and Access Tokens tab. Generate new access token by clicking Create My Access Token.
- Collect following values from the Keys and Access Tokens tab.
- Consumer key
- Consumer Secret
- Access Token
- Access Token Secret
- Update the parameter values for the extension with the values you collected in the previous step.
Find some useful links below:
Latest API Docs
Latest API Docs is 2.0.0.
How to use
Using the extension in WSO2 Stream Processor
-
You can use this extension with the latest WSO2 Stream Processor that is a part of the WSO2 Analytics offering, with editor, debugger and simulation support.
-
This extension is shipped by default with WSO2 Stream Processor. If you need to use an alternative version of this extension, you can replace the component jar that can be found in the
<STREAM_PROCESSOR_HOME>/lib
directory.
Using the extension as a java library
- This extension can be added as a maven dependency along with other Siddhi dependencies to your project.
<dependency>
<groupId>org.wso2.extension.siddhi.io.twitter</groupId>
<artifactId>siddhi-io-twitter</artifactId>
<version>x.x.x</version>
</dependency>
Jenkins Build Status
Branch | Build Status |
---|---|
master |
Features
- twitter (Source)
The Twitter source receives events from a Twitter app. The events are received in the form of key-value mappings.
The following are key values of the map of a tweet and their descriptions:
1. createdAt: The UTC time at which the Tweet was created.
2. tweetId: The integer representation for the unique identifier of the Tweet.
3. text: The actual UTF-8 text of the status update.
4. user.createdAt: The UTC date and time at which the user account was created on Twitter.
5. user.id: The integer representation for the unique identifier of the user who posted the Tweet.
6. user.screenName: The screen name with which the user identifies himself/herself.
7. user.name: The name of the user (as specified by the user).
8. user.mail: Themail.id
of the user.
9. user.location: The location in which the current user account profile is saved. This parameter can have a null value.
10. hashtags: The hashtags that have been parsed out of the Tweet.
11. userMentions: The other Twitter users who are mentioned in the text of the Tweet.
12. mediaUrls: The media elements uploaded with the Tweet.
13. urls: The URLs included in the text of a Tweet.
14. language: The language in which the Tweet is posted.
15. source: the utility used to post the Tweet as an HTML-formatted string.
16. isRetweet: This indicates whether the Tweet is a Retweet or not.
17. retweetCount: The number of times the Tweet has been retweeted.
18. favouriteCount: This indicates the number of times the Tweet has been liked by Twitter users. The value for this field can be null.
19. geoLocation: The geographic location from which the Tweet was posted by the user or client application. The value for this field can be null.
20. quotedStatusId: This field appears only when the Tweet is a quote Tweet. It displays the integer value Tweet ID of the quoted Tweet.
21. in.reply.to.status.id: If the Tweet is a reply to another Tweet, this field displays the integer representation of the original Tweet's ID. The value for this field can be null.
22. place.id: An ID representing the current location from which the Tweet is read. This is represented as a string and not an integer.
23. place.name: A short, human-readable representation of the name of the place.
24. place.fullName: A complete human-readable representation of the name of the place.
25. place.country_code: A shortened country code representing the country in which the place is located.
26. place.country: The name of the country in which the place is located.
27. track.words: The keywords given by the user to track.
28. polling.query: The query provided by the user.
How to Contribute
-
Report issues at GitHub Issue Tracker.
-
Send your contributions as pull requests to the master branch.
Contact us
-
Post your questions with the "Siddhi" tag in Stackoverflow.
-
Siddhi developers can be contacted via the following mailing lists:
Developers List : [email protected]
Architecture List : [email protected]
Support
-
We are committed to ensuring support for this extension in production. Our unique approach ensures that all support leverages our open development methodology and is provided by the very same engineers who build the technology.
-
For more details and to take advantage of this unique opportunity contact us viahttp://wso2.com/support/.