abstract class Base (View source)

Base Client class.

Constants

DEFAULT_API_BASE_URL

DEFAULT_API_VERSION

API_KEY_HEADER

API_VERSION_HEADER

Properties

protected ClientInterface $client

Client to access Rokka.

Methods

__construct(ClientInterface $client)

Constructor.

setCredentials(string $key, string $secret)

Set the credentials.

Response
call(string $method, string $path, array $options = [], bool $needsCredentials = true)

Call the API rokka endpoint.

Details

__construct(ClientInterface $client)

Constructor.

Parameters

ClientInterface $client

Client instance

setCredentials(string $key, string $secret)

Set the credentials.

Parameters

string $key

API key

string $secret

API secret

protected Response call(string $method, string $path, array $options = [], bool $needsCredentials = true)

Call the API rokka endpoint.

Parameters

string $method

HTTP method to use

string $path

Path on the API

array $options

Request options

bool $needsCredentials

True if credentials are needed

Return Value

Response