Update AbstractApi.php

This commit is contained in:
Tony Roy 2021-03-11 10:10:18 -04:00 committed by GitHub
commit b2152be0c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,4 +29,28 @@ abstract class AbstractApi implements ApiInterface
'api_key' => $this->client->getHttpClient()->getOptions()['key']
], $parameters));
}
/**
* @param array $parameters
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
protected function put($parameters)
{
return $this->client->getHttpClient()->put(array_merge([
'api_key' => $this->client->getHttpClient()->getOptions()['key']
], $parameters));
}
/**
* @param array $parameters
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
protected function delete($parameters)
{
return $this->client->getHttpClient()->delete(array_merge([
'api_key' => $this->client->getHttpClient()->getOptions()['key']
], $parameters));
}
}