Commit Graph

9 Commits

Author SHA1 Message Date
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