Recombee API client

InsertToSeries extends Request

Inserts an existing item/series into series of given seriesId at position determined by time.

Table of Contents

$cascade_create  : bool
$ensure_https  : bool
$item_id  : string
$item_type  : string
$optional  : array<string|int, mixed>
$series_id  : string
$time  : float
$timeout  : int
__construct()  : mixed
Construct the request
getBodyParameters()  : array<string|int, mixed>
Get body parameters
getEnsureHttps()  : bool
Returns true if HTTPS must be chosen over HTTP for this request
getMethod()  : static
Get used HTTP method
getPath()  : string
Get URI to the endpoint
getQueryParameters()  : array<string|int, mixed>
Get query parameters
getTimeout()  : int
Get request timeout
setEnsureHttps()  : mixed
Sets if HTTPS must be chosen over HTTP for this request
setTimeout()  : mixed
Sets request timeout

Properties

$ensure_https

protected bool $ensure_https

Methods

__construct()

Construct the request

public __construct(string $series_id, string $item_type, string $item_id, float $time[, array<string|int, mixed> $optional = array() ]) : mixed
Parameters
$series_id : string

ID of the series to be inserted into.

$item_type : string

item iff the regular item from the catalog is to be inserted, series iff series is inserted as the item.

$item_id : string

ID of the item iff itemType is item. ID of the series iff itemType is series.

$time : float

Time index used for sorting items in the series. According to time, items are sorted within series in ascending order. In the example of TV show episodes, the episode number is a natural choice to be passed as time.

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

Optional parameters given as an array containing pairs name of the parameter => value

  • Allowed parameters:
    • cascadeCreate
      • Type: bool
      • Description: Indicates that any non-existing entity specified within the request should be created (as is corresponding PUT requests were invoked). This concerns both the seriesId and the itemId. If cascadeCreate is set true, the behavior also depends on the itemType. Either item or series may be created if not present in the database.
Tags
throws
UnknownOptionalParameterException

UnknownOptionalParameterException if an unknown optional parameter is given in $optional

Return values
mixed

getBodyParameters()

Get body parameters

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

Values of body parameters (name of parameter => value of the parameter)

getEnsureHttps()

Returns true if HTTPS must be chosen over HTTP for this request

public getEnsureHttps() : bool
Return values
bool

true if HTTPS must be chosen

getMethod()

Get used HTTP method

public getMethod() : static
Return values
static

Used HTTP method

getPath()

Get URI to the endpoint

public getPath() : string
Return values
string

URI to the endpoint

getQueryParameters()

Get query parameters

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

Values of query parameters (name of parameter => value of the parameter)

getTimeout()

Get request timeout

public getTimeout() : int
Return values
int

Request timeout in milliseconds

setEnsureHttps()

Sets if HTTPS must be chosen over HTTP for this request

public setEnsureHttps(mixed $ensure_https) : mixed
Parameters
$ensure_https : mixed
Return values
mixed

setTimeout()

Sets request timeout

public setTimeout(mixed $timeout) : mixed
Parameters
$timeout : mixed
Return values
mixed

Search results