This repository has been archived by the owner on Feb 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
README
76 lines (56 loc) · 2.09 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
SleekPubsub is an XMPP Publish-Subscribe implementation that aims to be a creative and flexible solution to your publish-subscribe needs.
SleekPubsub implements a XEP-0060 interface, an HTTP RESTful interface, a XEP-0050 (Ad Hoc Commands) interface, and a bot/chat interface.
Credits
-------
Author: Nathan Fritz
jid: xmpp:[email protected]
Contributors: Michael Garvin
Unusual Features
----------------
- many node types -- start by overriding leaf and create your own behavior
- <body xmlns='jabber:client' /> payloads can optionally create chat IM without pubsub payload.
- subscribe to the component and it can automatically subscribe you to a node
- subscribe to a node and the full jid that you subscribe to can be the source of all of your updates, rather than the bare component jid
RESTful Interface
-----------------
All HTTP calls are protected with http-auth which is configured in the ini [rest] section
So far:
GET /default/
get the default config in json
POST /node/[node]
create or reconfigure node w/ config via json
GET /node/[node]
retrieve config in json
DELETE /node/[node]
remove a node
GET /subscribe/[node]?jid=[jid]
subscribe a jid to node
GET /unsubscribe/[node]?jid=[jid]&subid=[subscription id]
unsubscribe a jid from a node
POST /publish/[node]
publish to a node via xml body
GET /affiliation/[node]
get node affiliations
POST /affiliations/[node]
update node affiliations
**NOTE: POSTS needs to be content-type of text/json or text/xml
Usage: publish_subscribe.py [options]
-------------------------------------
Options:
-h, --help show this help message and exit
--daemon run as daemon
-q, --quiet set logging to ERROR
-d, --debug set logging to DEBUG
-v, --verbose set logging to COMM
-c CONFIGFILE, --config=CONFIGFILE
set config file to use
Requirements
------------
SleekXMPP github master (will tag a release soon)
Python 3.x (will make 2.6 compatible soon)
Quickstart
----------
See INSTALL file
Gotchas
-------
- The sqlite3 db will not work if you switch between python2.6 and 3.x