Recombee API client

Client

Client for easy usage of Recombee recommendation API

Table of Contents

$account  : mixed
$base_uri  : mixed
$guzzle_client  : mixed
$options  : mixed
$protocol  : mixed
$request  : mixed
$token  : mixed
__construct()  : mixed
Create the client
send()  : mixed
Send a request to the Recombee API
checkErrors()  : mixed
delete()  : mixed
formatQueryParameterValue()  : mixed
get()  : mixed
getHttpHeaders()  : mixed
getOptionalHttpHeaders()  : mixed
getRequestOptions()  : mixed
getUserAgent()  : mixed
hmacSign()  : mixed
hmacTime()  : mixed
paramsToUrl()  : mixed
post()  : mixed
put()  : mixed
sendMultipartBatch()  : mixed
signUrl()  : mixed

Properties

$account

protected mixed $account

$base_uri

protected mixed $base_uri

$guzzle_client

protected mixed $guzzle_client

$options

protected mixed $options

$protocol

protected mixed $protocol

$request

protected mixed $request

Methods

__construct()

Create the client

public __construct(string $account, string $token[, string $protocol = 'https' ][, array<string|int, mixed> $options = array() ]) : mixed
Parameters
$account : string

Name of your account at Recombee

$token : string

Secret token

$protocol : string = 'https'

Default protocol for sending requests. Possible values: 'http', 'https'.

$options : array<string|int, mixed> = array()

Other custom options

Return values
mixed

send()

Send a request to the Recombee API

public send(Request $request) : mixed
Parameters
$request : Request

Request that will be sent

Tags
throws
ResponseException

ResponseException if the request fails (a status different from 200 or 201 is returned)

throws
ApiTimeoutException

ApiTimeoutException if the request takes too long

Return values
mixed

checkErrors()

protected checkErrors(mixed $response) : mixed
Parameters
$response : mixed
Return values
mixed

delete()

protected delete(mixed $uri, mixed $timeout) : mixed
Parameters
$uri : mixed
$timeout : mixed
Return values
mixed

formatQueryParameterValue()

protected formatQueryParameterValue(mixed $value) : mixed
Parameters
$value : mixed
Return values
mixed

get()

protected get(mixed $uri, mixed $timeout) : mixed
Parameters
$uri : mixed
$timeout : mixed
Return values
mixed

getHttpHeaders()

protected getHttpHeaders() : mixed
Return values
mixed

getOptionalHttpHeaders()

protected getOptionalHttpHeaders() : mixed
Return values
mixed

getRequestOptions()

protected getRequestOptions() : mixed
Return values
mixed

getUserAgent()

protected getUserAgent() : mixed
Return values
mixed

hmacSign()

protected hmacSign(mixed $uri, mixed $timeStr) : mixed
Parameters
$uri : mixed
$timeStr : mixed
Return values
mixed

hmacTime()

protected hmacTime(mixed $uri) : mixed
Parameters
$uri : mixed
Return values
mixed

paramsToUrl()

protected paramsToUrl(mixed $params) : mixed
Parameters
$params : mixed
Return values
mixed

post()

protected post(mixed $uri, mixed $timeout, mixed $body) : mixed
Parameters
$uri : mixed
$timeout : mixed
$body : mixed
Return values
mixed

put()

protected put(mixed $uri, mixed $timeout, mixed $body) : mixed
Parameters
$uri : mixed
$timeout : mixed
$body : mixed
Return values
mixed

sendMultipartBatch()

protected sendMultipartBatch(mixed $request) : mixed
Parameters
$request : mixed
Return values
mixed

signUrl()

protected signUrl(mixed $uri) : mixed
Parameters
$uri : mixed
Return values
mixed

Search results