1782
|
1 #summary Subscribe to Twitter search queries over pubsub
|
|
2 #labels Stage-Alpha
|
|
3
|
|
4 = Introduction =
|
|
5
|
|
6 Twitter has an open 'realtime' search API, but it requires polling (within their rate limits). This module allows Prosody to poll for you, and push new results to subscribers over XMPP.
|
|
7
|
|
8 = Configuration =
|
|
9
|
|
10 This module must be loaded on a Prosody pubsub component. Add it to `modules_enabled` and configure like so:
|
|
11
|
|
12 {{{
|
|
13 Component "pubsub.example.com" "pubsub"
|
|
14 modules_enabled = { "pubsub_twitter" }
|
|
15
|
|
16 twitter_searches = {
|
|
17 realtime = "xmpp OR realtime";
|
|
18 prosody = "prosody xmpp";
|
|
19 }
|
|
20 }}}
|
|
21
|
|
22 This example creates two nodes, 'realtime' and 'prosody' that clients can subscribe to using [http://xmpp.org/extensions/xep-0060.html XEP-0060]. Results are in [http://atomenabled.org/ ATOM 1.0 format] for easy consumption.
|
|
23
|
|
24 || *Option* || *Description* ||
|
|
25 || twitter_searches || A list of virtual nodes to create and their associated Twitter search queries. ||
|
|
26 || twitter_pull_interval || Number of minutes between polling for new results (default 20) ||
|
|
27 || twitter_search_url || URL of the JSON search API, default: "http://search.twitter.com/search.json" ||
|
|
28
|
|
29 = Compatibility =
|
|
30 || 0.9 || Works || |