You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2016/10/14 21:54:33 UTC

incubator-ponymail git commit: Docn for preferences

Repository: incubator-ponymail
Updated Branches:
  refs/heads/master 5f40e4ae7 -> 0b13aeb28


Docn for preferences

Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/0b13aeb2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/0b13aeb2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/0b13aeb2

Branch: refs/heads/master
Commit: 0b13aeb280ebe023329850264619932b3d86d683
Parents: 5f40e4a
Author: Sebb <se...@apache.org>
Authored: Fri Oct 14 22:54:09 2016 +0100
Committer: Sebb <se...@apache.org>
Committed: Fri Oct 14 22:54:09 2016 +0100

----------------------------------------------------------------------
 docs/API.md              |  9 ++++++++-
 site/api/preferences.lua | 12 ++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/0b13aeb2/docs/API.md
----------------------------------------------------------------------
diff --git a/docs/API.md b/docs/API.md
index 70461ea..46f9cab 100644
--- a/docs/API.md
+++ b/docs/API.md
@@ -3,10 +3,11 @@
 ### Fetching a specific email:
 
 Usage:
-`GET /api/email.lua?id=$mid`
+`GET /api/email.lua?id=$mid[&attachment=true&file=$hash]`
 
 Parameters: (cookie may be required)
   - $mid: The email ID or Message-ID: header
+  - $hash: the file attachment hash
 
 Response example:
 
@@ -80,6 +81,12 @@ Usage:
 
 Parameters: (cookie required)
   - logout: Whether to log out of the system (optional)
+  - associate=$email - associate the account with the $email address
+  - verify&hash=$hash - verify an association request $hash
+  - removealt=$email - remove an alternate $email address
+  - save - save preferences
+  - addfav=$list - add a favourite $list
+  - remfav=$list - remove a favourite $list
 
 
 Response example:

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/0b13aeb2/site/api/preferences.lua
----------------------------------------------------------------------
diff --git a/site/api/preferences.lua b/site/api/preferences.lua
index 80f3c0f..f6204f4 100644
--- a/site/api/preferences.lua
+++ b/site/api/preferences.lua
@@ -25,6 +25,18 @@ local smtp = require 'socket.smtp'
 local config = require 'lib/config'
 local aaa = require 'lib/aaa'
 
+--[[
+Get login details (if logged in), mail list counts and descriptions
+
+Parameters: (cookie required)
+  - logout: Whether to log out of the system (optional)
+  - associate=$email - associate the account with the $email address
+  - verify&hash=$hash - verify an association request $hash
+  - removealt=$email - remove an alternate $email address
+  - save - save preferences
+  - addfav=$list - add a favourite $list
+  - remfav=$list - remove a favourite $list
+]]--
 function handle(r)
     local now = r:clock()
     r.content_type = "application/json"