Skip to content

Commit

Permalink
Can count entries for a specific day.
Browse files Browse the repository at this point in the history
  • Loading branch information
BaylorRae committed Sep 13, 2010
1 parent 128eb69 commit 7ef0a9c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions php/WufooApiWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,27 @@ public function getEntryCount($identifier, $from = 'forms', $getArgs = '') {
return $countObject->EntryCount;
}

/**
* Gets the entry count for a specific day.
*
*
* @param string $identifier a URL or Hash
* @return int today's entry count
* @author Baylor Rae'
*/
public function getEntryCountToday($identifier) {
$url = $this->getFullUrl($from.'/'.$identifier) . '?includeTodayCount=true';
$this->curl = new WufooCurl();
$countObject = json_decode($this->curl->getAuthenticated($url, $this->apiKey));

if( isset($countObject->EntryCountToday) )
return $countObject->EntryCountToday;
elseif( isset($countObject->Forms[0]->EntryCountToday) )
return $countObject->Forms[0]->EntryCountToday;
else
return 0;
}

/**
* Gets all reports permitted to user.
*
Expand Down

0 comments on commit 7ef0a9c

Please sign in to comment.