Commit Graph

14 Commits

Author SHA1 Message Date
Mark Liversedge
38a93ebb81 API list meanmax nits
.. csv headings should match request
.. error on unknown data series
2015-09-10 06:48:34 +01:00
Mark Liversedge
b529e04907 API MeanMax any series
.. add parameter series to specify which
   series to extract from the ridefilecache
   any of; watts, hr, cad, speed, vam, NP,
   xPower, nm.
2015-09-09 22:00:01 +01:00
Mark Liversedge
cac9b84859 API List MMP
.. returns the mean max power array for a
   given ride in csv format.

   e.g. http://http://localhost:12021/athlete/meanmax/2015_08_09_10_59_09.json

   will return the power mean max data in
   csv format.
2015-09-09 21:36:15 +01:00
Mark Liversedge
42248d5584 API List Activity Content-Type and Accept header
.. if the caller sets a content type we can provide in the
   header of the http request then we honour it; e.g.
   Accept: "text/csv" we will convert to CSV.

.. also updated to set the content type to match the file
   format we are providing; just in case the client needs to
   know what it got !
2015-09-09 14:44:09 +01:00
Mark Liversedge
2dbe960dfb API List Activities added before parameter
.. if you can list activities 'since' a date then
   it makes sense to also list those 'before' and
   then combine them to create a range.
2015-09-08 22:30:14 +01:00
Mark Liversedge
d95ec38593 API Fetch Activity format=...
.. when retreiving an activity using the API
   you can now specify the format you want the
   data to be returned in.

   it can be one of;
   tcx - garmin training centre xml
   pwx - training peaks xml
   json - goldencheetah json
   csv - all available data (not powertap csv)

.. along the way the file writers for the respective
   formats now accept a NULL context to work standalone.
   this may be useful as a file conversion tool.
2015-09-08 21:13:17 +01:00
Mark Liversedge
1d1508c524 API return activity
.. just straight up for now, so;

   http://localhost:12021/athlete/activity/2015_08_09_10_59_09.json

   will just return the ride unchanged in the format
   it is stored in. Some parameters will now be added
   to enable the format to be selected, from those that
   we can support.
2015-09-08 20:17:56 +01:00
Mark Liversedge
fa40917053 API Buffered Write
.. when sending metrics, since if no selection is made
   it can result in thousands of needless updates !
2015-09-08 11:48:46 +01:00
Mark Liversedge
d8d90370e2 API List Rides Specify Since
.. To restrict to more recent rides the
   API for list rides will now take a
   parameter 'since'

   localhost:12021/athlete/?since=2015/02/01

   Will only list rides since 1st February 2015
   and can of course be used alongside 'metrics'
   to control what metrics are returned.

   localhost:12021/athlete/?since=2015/02/01&metrics=NP
2015-09-07 19:55:14 +01:00
Mark Liversedge
58b3557f86 API List Rides Specify Metrics
.. when getting the ride list its useful to be
   able to get specific metrics (rather than all
   260 odd).

   URL can have parameter metrics that is a comma
   separated list of metrics to provide e.g;

   localhost:12021/athlete/?metrics=NP,Average_Power
2015-09-07 19:36:42 +01:00
Mark Liversedge
0abbeed952 API List Activities
.. will provide the metric db for an athlete as the
   activity list including all metrics in CSV format
   at the URL:

   http://localhost:12021/Athlete Name/

   The data is sent in chunks as it is parsed from the
   ride cache. We do not cache or maintain state so this
   call is expensive !
2015-09-07 15:36:29 +01:00
Mark Liversedge
e6cc21bfbc API List Athletes
.. easiest one first, just list athletes
   along with basic details like sex and age
2015-09-06 20:41:47 +01:00
Mark Liversedge
28eb76827c API Framework v1.0
.. just 4 endpoints available;

   - list athletes
   - list rides
   - get ride sample data
   - get ride mmp data

.. next few commits will need to implement each of the 4
   API endpoints, returning CSV data in the response.
2015-09-06 17:50:38 +01:00
Mark Liversedge
139af8d3a2 Introduce our own API service
.. just returns a dull page for now.
2015-09-06 16:27:49 +01:00