Recombee API client

ListItems extends Request

Gets a list of IDs of items currently present in the catalog.

Table of Contents

$count  : int
$ensure_https  : bool
$filter  : string
$included_properties  : array<string|int, mixed>
$offset  : int
$optional  : array<string|int, mixed>
$return_properties  : bool
$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

$included_properties

protected array<string|int, mixed> $included_properties

$optional

protected array<string|int, mixed> $optional

$return_properties

protected bool $return_properties

Methods

__construct()

Construct the request

public __construct([array<string|int, mixed> $optional = array() ]) : mixed
Parameters
$optional : array<string|int, mixed> = array()

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

  • Allowed parameters:
    • filter
      • Type: string
      • Description: Boolean-returning ReQL expression, which allows you to filter items to be listed. Only the items for which the expression is true will be returned.
    • count
      • Type: int
      • Description: The number of items to be listed.
    • offset
      • Type: int
      • Description: Specifies the number of items to skip (ordered by itemId).
    • returnProperties
      • Type: bool
      • Description: With returnProperties=true, property values of the listed items are returned along with their IDs in a JSON dictionary. Example response:
  [
    {
      "itemId": "tv-178",
      "description": "4K TV with 3D feature",
      "categories":   ["Electronics", "Televisions"],
      "price": 342,
      "url": "myshop.com/tv-178"
    },
    {
      "itemId": "mixer-42",
      "description": "Stainless Steel Mixer",
      "categories":   ["Home & Kitchen"],
      "price": 39,
      "url": "myshop.com/mixer-42"
    }
  ]
- *includedProperties*
    - Type: array
    - Description: Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.

Example response for includedProperties=description,price:

  [
    {
      "itemId": "tv-178",
      "description": "4K TV with 3D feature",
      "price": 342
    },
    {
      "itemId": "mixer-42",
      "description": "Stainless Steel Mixer",
      "price": 39
    }
  ]
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