API Index

Current-Season Dates

returns { 'start':date 'end':date } containing the current season's start or end dates

uri:

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

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
503: throttled

Examples:


Python using httplib2

    url = "http://powertwenty.com/c2logapi/1/currentseason/dates"
    h = httplib2.Http()
    authorizationHeader = "Basic %%s"%%base64.b64encode("%%s:%%s"%%("username", "password"))
    resp, content = h.request( url, "GET", headers={ "Authorization":authorizationHeader, "X-API-KEY":"xxxxxxxxxxxxxxx" } )
    assert resp["status"]=="200"
    dates = json.loads(content) 
    startDate = datetime.datetime.strptime( dates["start"], "%Y-%m-%d 00:00:00")
    endDate = datetime.datetime.strptime(dates["end"], "%Y-%m-%d 00:00:00")

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