Hey folks,
yesterday i wrote a small iOS app to draw a graph for various time ranges and thanks to the API it went really smooth and I got it running for my device within the evening. Anyway, I have some suggestions for an extended API:
-
when NOT grouping the posts, then the maximum output per request is 500 entries (starting with the first entry of the day provided via “from_date” param, if “from_date” is provided).
It would be great go get either an optional parameter “start_at_hour=15” or an optional parameter “limit=42” so I can request the last N posts. (500 might be ‘too much information’ in most situations
YourAPIDoc currently describes “from_date”: “Starting date YYYY-MM-DD. If not set gets a limit of 500 posts since the to date.” -> not true, if I d not provide the “from_date” param, then I get the FIRST 500 posts since the device was activated. -
when grouping it would be great to get the min and max values for every param either always or per additional request parameter (“min_max=true” - so one has to explicitly provide that parameter to avoid unnecessary calculations on you side).
-
group_by could be extended to “week” and “month” to get an average reading about that time span. alternatively a more flexible group_by could look like this: “group_by=3hour(s)”. Furthermore it would be helpful if you describe the varying response parameters when grouping (“insert_datetime” and “timestamp” when not grouping, “date” when grouping by day, “date” and “hour” when grouping by hour).
Thank you
Bastian