From 39d9d405709c26abb4522a31571434622e1e89c1 Mon Sep 17 00:00:00 2001 From: Stephen Smith Date: Tue, 24 Nov 2015 23:04:44 -0600 Subject: [PATCH 1/2] URI change for dailySummary to match Wakatime API https://wakatime.com/developers/#summaries --- src/WakaTime.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WakaTime.php b/src/WakaTime.php index bc3919a..8b40e6a 100644 --- a/src/WakaTime.php +++ b/src/WakaTime.php @@ -63,7 +63,7 @@ public function dailySummary($startDate, $endDate, $project = null) { if ($project !== null) $project = "&project={$project}"; - return $this->guzzle->get("{$this->url}/summaries?start={$startDate}&end={$endDate}&api_key={$this->getApiKey()}" . $project)->json(); + return $this->guzzle->get("{$this->url}/users/current/summaries?start={$startDate}&end={$endDate}&api_key={$this->getApiKey()}" . $project)->json(); } /** From 3eedc6d0f2d9f850dec229fa55fa0212af1b5b15 Mon Sep 17 00:00:00 2001 From: Stephen Smith Date: Tue, 24 Nov 2015 23:15:12 -0600 Subject: [PATCH 2/2] Update readme with new wakatime doc urls See: https://wakatime.com/developers --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8add952..f6c8203 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ **WakaTime API for PHP** -This is a PHP package for WakaTime API. It offers all the methods from [WakaTime API](https://wakatime.com/api) with additional methods for total hours logged. +This is a PHP package for WakaTime API. It offers all the methods from [WakaTime API](https://wakatime.com/developers) with additional methods for total hours logged. If you are using [Laravel](http://laravel.com/) check out [WakaTime Reports and Laravel](http://mariobasic.com/wakatime-reports-and-laravel/) on my blog. @@ -52,7 +52,7 @@ You can get your Api Key from your [settings page](https://wakatime.com/settings $wakatime->currentUser() ``` -See: https://wakatime.com/api#users-current for details. +See: https://wakatime.com/developers/#users for details. #### dailySummary @@ -60,7 +60,7 @@ See: https://wakatime.com/api#users-current for details. $wakatime->dailySummary($startDate, $endDate, $project = null) ``` -See: https://wakatime.com/api#summary-daily for details. +See: https://wakatime.com/developers/#summaries for details. #### stats @@ -68,7 +68,7 @@ See: https://wakatime.com/api#summary-daily for details. $wakatime->stats($range, $project = null) ``` -See: https://wakatime.com/developers#stats for details. +See: https://wakatime.com/developers/#stats for details. ### Additional methods