-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsample.php
More file actions
34 lines (29 loc) · 882 Bytes
/
sample.php
File metadata and controls
34 lines (29 loc) · 882 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
error_reporting(E_ALL);
include('class.runkeeper.php');
$rk = new Runkeeper('YOUR EMAIL', 'YOUR PASS', 'YOUR USERNAME', BOOLEAN FOR KEEPING LOGS);
//Get activity after or equal to 5/15
$rk->get('activity', array(
'min_date' => '05/15/2011'
));
//Get fastest pace of 5K or above
$pace = $rk->get('pace', array(
'username' => 'phpfunk',
'type' => 'run',
'return' => 'best',
'distance' => '>=3.1',
'min_date' => '05/01/2011',
'max_date' => '05/31/2011'
));
//Get street team and total running miles in May for each
$rk->get('street_team');
foreach ($rk->street_team as $username => $fqn) {
$miles = $rk->get('miles', array(
'username' => $username,
'min_date' => '05/01/2011',
'max_date' => '05/31/2011',
'type' => 'run'
));
print 'RUNNER: ' . $fqn . ' (' . $username . ') ran ' . $miles . ' miles in May.<BR>';
}
?>