ListItems

Extends \Recombee\RecommApi\Requests\Request

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

package

Default

Methods

Construct the request

__construct(array $optional = array()) 
Throws
\Recombee\RecommApi\Requests\Exceptions\UnknownOptionalParameterException

UnknownOptionalParameterException if an unknown optional parameter is given in $optional

Arguments

$optional

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
        }
        ]

Get body parameters

getBodyParameters() : array
inherited abstract

Response

array

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

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

getEnsureHttps() : boolean
inherited

Response

boolean

true if HTTPS must be chosen

Get used HTTP method

getMethod() : static
inherited abstract

Response

static

Used HTTP method

Get URI to the endpoint

getPath() : string
inherited abstract

Response

string

URI to the endpoint

Get query parameters

getQueryParameters() : array
inherited abstract

Response

array

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

Get request timeout

getTimeout() : integer
inherited

Response

integer

Request timeout in milliseconds

Sets if HTTPS must be chosen over HTTP for this request

setEnsureHttps( $ensure_https) 
inherited

Arguments

$ensure_https

Sets request timeout

setTimeout( $timeout) 
inherited

Arguments

$timeout

Properties

Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter items to be listed. Only the items for which the expression is *true* will be returned.

filter : string
var

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.

Type(s)

string

The number of items to be listed.

count : integer
var

The number of items to be listed.

Type(s)

integer

Specifies the number of items to skip (ordered by `itemId`).

offset : integer
var

Specifies the number of items to skip (ordered by itemId).

Type(s)

integer

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" } ] ```

return_properties : boolean
var

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"
    }
  ]

Type(s)

boolean

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 } ] ```

included_properties : array
var

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
    }
  ]

Type(s)

array

Array containing values of optional parameters

optional : array
var

Array containing values of optional parameters

Type(s)

array

Timeout of the request in milliseconds

timeout : integer
inherited
var

Timeout of the request in milliseconds

Type(s)

integer

Sets if the HTTPS must be chosen over HTTP for this request

ensure_https : boolean
inherited
var

Sets if the HTTPS must be chosen over HTTP for this request

Type(s)

boolean