Update AbstractApi.php
This commit is contained in:
parent
2fbd9ab040
commit
039733e9f3
1 changed files with 20 additions and 8 deletions
|
|
@ -23,9 +23,9 @@ abstract class AbstractApi implements ApiInterface
|
|||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
protected function post($parameters)
|
||||
protected function get($path, $parameters)
|
||||
{
|
||||
return $this->client->getHttpClient()->post(array_merge([
|
||||
return $this->client->getHttpClient()->get($path, array_merge([
|
||||
'api_key' => $this->client->getHttpClient()->getOptions()['key']
|
||||
], $parameters));
|
||||
}
|
||||
|
|
@ -35,9 +35,9 @@ abstract class AbstractApi implements ApiInterface
|
|||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
protected function put($parameters)
|
||||
protected function post($path, $parameters)
|
||||
{
|
||||
return $this->client->getHttpClient()->put(array_merge([
|
||||
return $this->client->getHttpClient()->post($path, array_merge([
|
||||
'api_key' => $this->client->getHttpClient()->getOptions()['key']
|
||||
], $parameters));
|
||||
}
|
||||
|
|
@ -47,9 +47,21 @@ abstract class AbstractApi implements ApiInterface
|
|||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
protected function delete($parameters)
|
||||
protected function put($path, $parameters)
|
||||
{
|
||||
return $this->client->getHttpClient()->delete(array_merge([
|
||||
return $this->client->getHttpClient()->put($path, array_merge([
|
||||
'api_key' => $this->client->getHttpClient()->getOptions()['key']
|
||||
], $parameters));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $parameters
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
protected function delete($path, $parameters)
|
||||
{
|
||||
return $this->client->getHttpClient()->delete($path, array_merge([
|
||||
'api_key' => $this->client->getHttpClient()->getOptions()['key']
|
||||
], $parameters));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue