ApiService
Table of Contents
Methods
-
__construct()
: mixed
-
get()
: Result
-
getLogger()
: LoggerInterface
-
post()
: Result
__construct()
public
__construct(string $apiEndpoint[, int $timeout = 30 ][, LoggerInterface|null $logger = null ]) : mixed
Parameters
-
$apiEndpoint
: string
-
-
$timeout
: int
= 30
-
-
$logger
: LoggerInterface|null
= null
-
get()
public
get(string $endpoint[, array<string|int, string|int> $requestParams = null ]) : Result
Parameters
-
$endpoint
: string
-
-
$requestParams
: array<string|int, string|int>
= null
-
getLogger()
public
getLogger() : LoggerInterface
Return values
LoggerInterface
post()
public
post(string $endpoint[, array<string|int, mixed> $data = [] ]) : Result
Parameters
-
$endpoint
: string
-
-
$data
: array<string|int, mixed>
= []
-