changeset 249:963ae0ff05b0

Add page for mod_mam
author Kim Alvefur <zash@zash.se>
date Fri, 06 Jan 2012 16:52:20 +0100
parents 7a0d1a7355f4
children a711a9d4134d
files mod_data_access.wiki mod_mam.wiki
diffstat 2 files changed, 66 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mod_data_access.wiki	Fri Jan 06 11:32:52 2012 +0000
+++ b/mod_data_access.wiki	Fri Jan 06 16:52:20 2012 +0100
@@ -10,11 +10,10 @@
 {{{
 	GET /data[/<host>/<user>]/<store>[/<format>] HTTP/1.1
 	Authorization: <base64(authzid:password)>
-	[Host: <host>]
 
 	-- OR --
 
-	PUT|POST /data[/<host>/<user>]/<store>[/<format>] HTTP/1.1
+	PUT|POST /data[/<host>/<user>]/<store> HTTP/1.1
 	Content-Type: text/x-lua | application/json
 
 	<data>
@@ -34,8 +33,35 @@
 == Fields ==
 
 ||*Field*||*Description*||*Default*||
-||`host`||Which virtual host to access||Required. If not set in the path, the `Host` header is used. If that's not set either, the domain-part of the authzid is used.||
+||`host`||Which virtual host to access||Required. If not set in the path, the domain-part of the authzid is used.||
 ||`user`||Which users storage to access||Required. If not set in the path, uses the node part of the authzid.||
 ||`store`||Which storage to access.||Required.||
 ||`format`||Which format to serialize to. `json` and `lua` are supported. When uploading data, the `Content-Type` header is used.||`json`||
 ||`data`||The actual data to upload in a `PUT` or `POST` request.||`nil`||
+
+Note: Only admins can change data for users other than themselves.
+
+== Example usage ==
+
+Here follows some example usage using `curl`.
+
+Get your account details:
+
+{{{
+	curl http://prosody.local:5280/data/accounts -u user@example.com:secr1t
+	{"password":"secr1t"}
+}}}
+
+Set someones account details:
+
+{{{
+	curl -X PUT http://prosody.local:5280/data/example.com/user/accounts -u admin@host:r00tp4ssw0rd --header 'Content-Type: application/json' --data-binary '{"password":"changeme"}'
+}}}
+
+== Client library ==
+
+* https://metacpan.org/module/Prosody::Mod::Data::Access
+
+== TODO ==
+
+* Use `Accept` header.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mod_mam.wiki	Fri Jan 06 16:52:20 2012 +0100
@@ -0,0 +1,37 @@
+#summary XEP-xxxx: Message Archive Management (Really)
+#labels Stage-Alpha
+
+= Introduction =
+
+Implementation of [http://matthewwild.co.uk/uploads/message-archive-management.html XEP-xxxx: Message Archive Management]. Like [mod_archive] but much simpler.
+
+*Note* that this is an implementation of a ProtoXEP, which may be subject to major i changes.
+
+= Details =
+
+The server will archive messages passing through, and clients can query their archive.
+
+= Usage =
+
+First copy the module to the prosody plugins directory.
+
+Then add "mam" to your modules_enabled list:
+{{{
+    modules_enabled = {
+                    -- ...
+                    "mam",
+                    -- ...
+		}
+}}}
+
+= Configuration =
+
+= Compatibility =
+|| 0.8.0 || Works ||
+|| trunk || Should work ||
+
+= TODO =
+
+* Preferences
+* Optimize
+* Use new stanza archive API once it appears