ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [3/3] incubator-ponymail git commit: API.md does not document all the stats.lua parameters
Date Sat, 17 Dec 2016 13:10:14 GMT
API.md does not document all the stats.lua parameters

This fixes #115

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

Branch: refs/heads/master
Commit: 0e5d323dda43f6e125ac80ec9b936fb865bb7344
Parents: dfe2066
Author: Sebb <sebb@apache.org>
Authored: Sat Dec 17 13:09:58 2016 +0000
Committer: Sebb <sebb@apache.org>
Committed: Sat Dec 17 13:09:58 2016 +0000

----------------------------------------------------------------------
 CHANGELOG.md |  2 ++
 docs/API.md  | 20 +++++++++++++++++++-
 2 files changed, 21 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/0e5d323d/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3a30d7d..7ff6249 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -78,6 +78,8 @@
 - redundant matching of same string (#117)
 - ponymail.js uses unsupported preferences.lua parameter (#165)
 - preferences.lua never fetches descriptions (#163)
+- API.md does not document all the stats.lua parameters (#115)
+
 
 ## CHANGES in 0.9b:
 

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/0e5d323d/docs/API.md
----------------------------------------------------------------------
diff --git a/docs/API.md b/docs/API.md
index 4713578..2fb64a2 100644
--- a/docs/API.md
+++ b/docs/API.md
@@ -38,18 +38,23 @@ Response example:
 
 ### Fetching list data
 Usage:
-`GET /api/stats.lua?list=$list&domain=$domain[&d=$timespan][&q=$query][&header_from=$from][&header_subject=$subject]`
+`GET /api/stats.lua?list=$list&domain=$domain[&d=$timespan][&q=$query][&header_from=$from][&header_to=$to][&header_subject=$subject][&header_body=$body][&quick][&s=$s&e=$e]`
 
 Parameters:
+
     - $list: The list prefix (e.g. `dev`). Wildcards may be used
     - $domain: The list domain (e.g. `httpd.apache.org`). Wildcards may be used
     - $timespan: A [timespan](#Timespans) value
+    - $s: yyyy-mm start of month (day 1)
+    - $e: yyyy-mm end of month (last day)
     - $query: A search query (may contain wildcards or negations):
       - `foo`: Find all documents containing `foo` in headers or body
       - `-foo`: Find all documents NOT containing `foo`.
       - `foo*`: Find all documents containing `foo`, `fooa`, `foob` etc
     - $from: Optional From: address
+    - $to: Optional To: address
     - $subject: Optional Subject: line
+    - $body: Optional body text
     
 Response example:
 
@@ -94,6 +99,19 @@ Response example:
 }
 ~~~
 
+### <a name="Timespans"></a>Timespans
+
+Timespans supported by the &d= parameter.
+
+    - d=nnnn
+    - d=yyyy-mm => equivalent to &s=yyyy-mm&e=yyyy-mm
+    - d=lte=n[wMyd] (less than n[wMyd] ago, inclusive)
+    - d=gte=n[wMyd] (more than n[wMyd] ago, inclusive)
+    - d=.*dfr=yyyy-mm-dd.* (start date for search, inclusive)
+    - d=.*dto=yyyy-mm-dd.* (end date for search, inclusive)
+    - [wMyd] = weeks, Months, years, days
+    - lte and gte are mutually exclusive
+    - dfr and dto are normally both present
 
 ### Fetching preferences and quick list overview
 Usage:


Mime
View raw message