Skip to content

Commit

Permalink
Removed body from GET requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mat-Gr authored Oct 2, 2017
1 parent 71aaade commit 661bbe5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/TogglApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ public function getDashboardForWorkspace($workspaceId)
*/
public function getMe($related = false)
{
return $this->GET('me', [], ['with_related_data' => $related]);
return $this->GET('me', ['with_related_data' => $related]);
}

/**
Expand Down Expand Up @@ -868,7 +868,7 @@ public function getTimeEntries()
*/
public function getTimeEntriesInRange($start, $end)
{
return $this->GET('time_entries', [], ['start_date' => $start, 'end_date' => $end]);
return $this->GET('time_entries', ['start_date' => $start, 'end_date' => $end]);
}

/**
Expand Down Expand Up @@ -918,10 +918,10 @@ public function deleteTimeEntry($timeEntryId)
*
* @return bool|mixed|object
*/
private function GET($endpoint, $body = array(), $query = array())
private function GET($endpoint, $query = array())
{
try {
$response = $this->client->get($endpoint, ['body' => json_encode($body), 'query' => $query]);
$response = $this->client->get($endpoint, ['query' => $query]);

return $this->checkResponse($response);
} catch (ClientException $e) {
Expand Down

0 comments on commit 661bbe5

Please sign in to comment.