Skip to content

Commit c30425f

Browse files
committed
Pass accessToken if it needed
1 parent 0ed2b20 commit c30425f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Client.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,16 @@ public function getHydrator()
9393
*
9494
* @param $uri
9595
* @param array $parameters
96+
* @param bool $accessToken
9697
* @return bool
9798
* @throws Exception
9899
*/
99-
public function request($uri, array $parameters = array())
100+
public function request($uri, array $parameters = array(), $accessToken = false)
100101
{
102+
if ($accessToken) {
103+
$this->baseParameters['access_token'] = $this->accessToken;
104+
}
105+
101106
$parameters = array_merge($this->baseParameters, $parameters);
102107

103108
$request = $this->httpClient->get($uri.'?'.http_build_query($parameters));

0 commit comments

Comments
 (0)