Introduction
Hello! Welcome to the Walker Tracker API. This page is for you if you are a programmer / developer /tinkerer who would like to have access to Walker Tracker data in order to
- Re-visualize it
- Include it in your own application
- Create widgets, feeds, etc
If you'd like to join the conversation, make requests or get help we have a google group here:
Walker Tracker API Google Group .
You'll use HTTP GET requests and REST (representational state transfer) to get data from the API
A Walker Tracker API request might look like this:
http://walkertracker.com/api/ben.xml/view/20070514
*note - browsers show xml unequally. If it comes back as a single paragraph, view the source.
What's happening here?
We're telling Walker Tracker
- to send us a single step blog/count day (May 14th, 2007 = 20070514)
- for username 'ben'
- send the response in XML
Go to the examples to see more.
Currently the API is read only - a future version will include the ability to add step counts, etc.
Methods
- view — View a user's steps/ step blog entries. Also returns the user's step average and score.
- Accepts a single date in YYMMDD (20070621)
- Accepts a date range. Two YYYYMMDD dates, separated by a comma: 20070601,20070621
- groups — returns all groups for an individual user, plus data for those groups
- comrades — returns all comrade info for the user
Data Formats
The Walker Tracker API currently returns data in three formats- XML - eg: username.xml
- Serialized PHP Array - eg: username.serialized see php docs
- JSON - eg: username.json see JSON home page
Requests to the Walker Tracker API should appear like this
http://walkertracker.com/api/username.format/action
http://walkertracker.com/api/username.format/action/date
http://walkertracker.com/api/username.format/action/date_start,date_end
Examples
(currently just in php)
PHP FUNCTION FOR MAKING A CURL REQUEST TO WT API
function wt_api_request($username,$data_format,$method,$date_range="")
{
$api_url = "http://walkertracker.com/api/";
$api_request = $api_url . $username . "." . $data_format ."/".$method;
if($date_range !="")
{
$api_request .= "/" . $date_range;
}
$ch = curl_init();
$timeout = 10; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, $api_request);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$curl_contents = @(curl_exec($ch));
curl_close($ch);
return $curl_contents;
}
SHOW YOUR AVERAGE VS THE COLLECTIVE AVERAGE OF YOUR COMRADES
Serialized PHP:View Example plus Code
GET A LIST OF A WALKER'S GROUPS, GROUP DESCRIPTIONS AND AVERAGES
XML:View Example plus Code
CHART A WEEK'S DATA USING THE GOOGLE CHARTS API
View Example plus CodeFeatured Projects
We'd love to hear from you if you're using the API!
Drop us a line or mention it on our Walker Tracker API Google Group
- Walker Tracker-ee Brian Kerr built a wee mini-graph using the WT API, check it out.