API Index

Current-Season Summary

get a summary of the current season

This call returns the current season summary represented a JSON object. For example:
{
    daysThisSeasonSoFar: 312
    averageMetersPerDay: 1077
    averageMetersPerActualDaysRowed: 6718
    totalLifetimeMeters: 6860062
    totalMetersThisSeason: 335904
}

uri:

http://c2logapi.appspot.com/api/1/currentseason/summary

method:

GET

status codes:

200: ok
401: invalid Concept 2 Online logbook user name or password
403: invalid or missing C2 Logbook REST API key
405: method not allowed
503: throttled

Examples:


Python using httplib2

import httplib2   
import simplejson
import base64 

url = "http://powertwenty.com/c2logapi/1/currentseason/summary"
h = httplib2.Http()
authorizationHeader = "Basic %s"%base64.b64encode("%s:%s"%("user", "password"))
resp, content = h.request( url, "GET", headers={"Authorization":authorizationHeader, "X-API-KEY":"xxxxxxxxxxxxxxx" } )
assert resp["status"]=="200" 
current_season_summary = json.loads(content)
print "total meters this season:", current_season_summary.totalMetersThisSeason

 
 
Copyright © 2006-2017 by Power Twenty, LLC. All Rights Reserved.
Design by Interspire