class Factory (View source)

Factory class with static methods to easily instantiate clients.

Constants

API_BASE_URL

RENDER_BASE_URL

PROXY

GUZZLE_OPTIONS

Methods

static Image
getImageClient(string $organization, string $apiKey, array|string $options = [])

Return an image client.

static User
getUserClient(string|array|null $organization = null, string|null $apiKey = null, array $options = [])

Return a user client.

Details

static Image getImageClient(string $organization, string $apiKey, array|string $options = [])

Return an image client.

Parameters

string $organization

Organization name

string $apiKey

API key

array|string $options

Options like api_base_url or proxy

Return Value

Image

Exceptions

RuntimeException

static User getUserClient(string|array|null $organization = null, string|null $apiKey = null, array $options = [])

Return a user client.

Parameters

string|array|null $organization
string|null $apiKey

API key

array $options

Options like api_base_url or proxy

Return Value

User

Exceptions

RuntimeException