# HG changeset patch # User Kim Alvefur # Date 1325865140 -3600 # Node ID 963ae0ff05b0253298e095fdf9179a113ea8535d # Parent 7a0d1a7355f411e9add312148e0a5062302f90c0 Add page for mod_mam diff -r 7a0d1a7355f4 -r 963ae0ff05b0 mod_data_access.wiki --- 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[//]/[/] HTTP/1.1 Authorization: - [Host: ] -- OR -- - PUT|POST /data[//]/[/] HTTP/1.1 + PUT|POST /data[//]/ HTTP/1.1 Content-Type: text/x-lua | application/json @@ -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. diff -r 7a0d1a7355f4 -r 963ae0ff05b0 mod_mam.wiki --- /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