COM-40 :: Change API submission type to JSON and adjust function names
This commit is contained in:
@@ -71,7 +71,7 @@ class Guzzle implements Adapter
|
|||||||
|
|
||||||
$response = $this->client->put($uri, [
|
$response = $this->client->put($uri, [
|
||||||
'headers' => $headers,
|
'headers' => $headers,
|
||||||
'body' => $jsonBody
|
'json' => $jsonBody
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ class Guzzle implements Adapter
|
|||||||
|
|
||||||
$response = $this->client->patch($uri, [
|
$response = $this->client->patch($uri, [
|
||||||
'headers' => $headers,
|
'headers' => $headers,
|
||||||
'body' => $jsonBody
|
'json' => $jsonBody
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ class Guzzle implements Adapter
|
|||||||
{
|
{
|
||||||
$response = $this->client->delete($uri, [
|
$response = $this->client->delete($uri, [
|
||||||
'headers' => $headers,
|
'headers' => $headers,
|
||||||
'form_params' => $body
|
'json' => $body
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class Zones implements API
|
|||||||
* @param string $zoneID
|
* @param string $zoneID
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function purgeAll(string $zoneID): bool
|
public function cachePurgeEverything(string $zoneID): bool
|
||||||
{
|
{
|
||||||
$user = $this->adapter->delete('zones/' . $zoneID . '/purge_cache', [], ["purge_everything" => true]);
|
$user = $this->adapter->delete('zones/' . $zoneID . '/purge_cache', [], ["purge_everything" => true]);
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ class Zones implements API
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function purge(string $zoneID, array $files = [], array $tags = []): bool
|
public function cachePurge(string $zoneID, array $files = [], array $tags = []): bool
|
||||||
{
|
{
|
||||||
if (empty($files) && empty($tags)) {
|
if (empty($files) && empty($tags)) {
|
||||||
throw new EndpointException("No files or tags to purge.");
|
throw new EndpointException("No files or tags to purge.");
|
||||||
|
|||||||
Reference in New Issue
Block a user