You are here

public function Api::json in Fastly 8.3

Get JSON from response.

Parameters

\Psr\Http\Message\ResponseInterface $response: Response.

Return value

\stdClass JSON object.

7 calls to Api::json()
Api::getCurrentUser in src/Api.php
Gets Fastly user associated with an API key.
Api::getDetails in src/Api.php
Get Service Details.
Api::getServices in src/Api.php
Gets a list of services for the current customer.
Api::getToken in src/Api.php
Get a single token based on the access_token used in the request..
Api::purgeAll in src/Api.php
Purge whole site/service.

... See full list

File

src/Api.php, line 568

Class

Api
Fastly API for Drupal.

Namespace

Drupal\fastly

Code

public function json(ResponseInterface $response) {
  return json_decode($response
    ->getBody());
}