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
NOTE: the API is only accessible to our community members if they've explicitly listed themselves as 'public' in their preferences. If you have an interest in API access for your private program - please contact us
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:
yoursite.walkertracker.com/api/Athena.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 'Athena'
- 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
- teams — returns all teams for an individual user, plus data for those groups
- friends — returns all friend 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
yoursite.walkertracker.com/api/username.format/action
yoursite.walkertracker.com/api/username.format/action/date
yoursite.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 = "yoursite.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 FRIENDS
Serialized PHP:View Example plus Code
GET A LIST OF A WALKER'S TEAMS, TEAM DESCRIPTIONS AND AVERAGES
XML: View Example plus CodeCHART 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!