Documentation

ApiClient extends Client
in package
implements ApiClientInterface uses ApiClientTrait

Class ApiClient

Tags
author

Patrick Rainer rainer@datacycle.at

Table of Contents

Interfaces

ApiClientInterface
Interface for api client.

Properties

$credentials  : Credentials
$apiService  : ServiceInterface
$config  : ApiConfiguration
$defaultArgs  : array<string|int, mixed>
$logger  : LoggerInterface

Methods

__construct()  : mixed
creates a new api client.
createQueryBuilder()  : QueryBuilderInterface
creates a query object via api service
execute()  : Result
executes a query and return the Result model via api service
getArguments()  : array<string|int, mixed>
Get the available configurations
getConfiguration()  : array<string|int, mixed>
get the current Api client configuration
getCredentials()  : array<string|int, mixed>
Get the current client credentials
setApiService()  : void

Properties

$defaultArgs

private static array<string|int, mixed> $defaultArgs = ['config' => ['endpointId' => ['type' => 'value', 'valid' => ['string'], 'doc' => 'default endpoint (stored filter) id for dataCycle API requests', 'required' => true], 'presets' => ['fields' => ['type' => 'value', 'valid' => ['Array'], 'doc' => 'default fields definition for dataCycle API request', 'default' => []], 'include' => ['type' => 'value', 'valid' => ['Array'], 'doc' => 'default include definition for dataCycle API request', 'default' => []], 'language' => ['type' => 'value', 'valid' => ['Array'], 'doc' => 'default language code for dataCycle API requests.', 'default' => ['de']]]]]

$logger

private LoggerInterface $logger

logger

Methods

__construct()

creates a new api client.

public __construct(array<string|int, mixed> $args[, LoggerInterface|null $logger = null ][, ServiceFactoryMethod|null $serviceFactoryMethod = null ]) : mixed
APIYes
Parameters
$args : array<string|int, mixed>
$logger : LoggerInterface|null = null
$serviceFactoryMethod : ServiceFactoryMethod|null = null

createQueryBuilder()

creates a query object via api service

public createQueryBuilder([string $type = 'list' ][, array<string|int, mixed> $queryConfiguration = [] ]) : QueryBuilderInterface
APIYes
Parameters
$type : string = 'list'
$queryConfiguration : array<string|int, mixed> = []
Tags
throws
InvalidArgumentException
Return values
QueryBuilderInterface

getArguments()

Get the available configurations

public static getArguments() : array<string|int, mixed>
APIYes
Return values
array<string|int, mixed>

getConfiguration()

get the current Api client configuration

public getConfiguration() : array<string|int, mixed>
APIYes
Return values
array<string|int, mixed>

getCredentials()

Get the current client credentials

public getCredentials() : array<string|int, mixed>
APIYes
Return values
array<string|int, mixed>

        
On this page

Search results