Skip to content

Commit

Permalink
Fixed incorrect URL.
Browse files Browse the repository at this point in the history
  • Loading branch information
davereid committed Jul 2, 2011
1 parent 2ec5563 commit c5dfbc3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion toggl.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct($token) {
* Construct the request URI.
*/
protected function getURL($name) {
return $this->base_url . '/api/' . self::API_VERSION . $name . '.json';
return $this->base_url . '/api/' . self::API_VERSION . '/' . $name . '.json';
}

/**
Expand Down Expand Up @@ -104,6 +104,9 @@ public function timeEntriesLoadRecent($start_date = NULL, $end_date = NULL) {

$data = array();
if (isset($start_date) && isset($end_date)) {
if ($end_date < $start_date) {
throw new TogglException("Start date cannot be after the end date.");
}
$data['start_date'] = gmdate(DATE_ISO8601, $start_date);
$data['end_date'] = gmdate(DATE_ISO8601, $end_date);
}
Expand Down

0 comments on commit c5dfbc3

Please sign in to comment.