Skip to content

Commit

Permalink
Merge branch 'master' of github.com:huitiemesens/withings
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles-Antoine FOURNEL committed Oct 16, 2015
2 parents ddc4241 + b942314 commit af6d54d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/Withings/UserGateway.php
Expand Up @@ -32,15 +32,19 @@ public function getBody( $user = null, $stardate = null, $enddate = null , $last
*/
public function getActivities( $user = null, $startdate = "2015-01-01", $enddate = null )
{
if ( $enddate === null )
date( "Y-m-d");
if ( $user == null )
throw new \Exception("No Withings User id defined");

if ( $enddate !== null )
/*if ( $enddate !== null )
$date = "&startdateymd=" . $startdate . "&enddateymd=" . $enddate;
else
$date = "&date" . $startdate;
$date = "&date" . $startdate;*/

$date = "&startdateymd=" . $startdate . "&enddateymd=" . $enddate;

return $this->makeApiRequest( 'v2/measure?action=getactivity&userid=' . $user );//. $date );
return $this->makeApiRequest( 'v2/measure?action=getactivity&userid=' . $user . $date );
}

/**
Expand Down

0 comments on commit af6d54d

Please sign in to comment.