public class ListItems extends Request
Modifier and Type | Field and Description |
---|---|
protected java.lang.Long |
count
The number of items to be listed.
|
protected java.lang.String |
filter
Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter items to be listed.
|
protected java.lang.String[] |
includedProperties
Allows to specify, which properties should be returned when `returnProperties=true` is set.
|
protected java.lang.Long |
offset
Specifies the number of items to skip (ordered by `itemId`).
|
protected java.lang.Boolean |
returnProperties
With `returnProperties=true`, property values of the listed items are returned along with their IDs in a JSON dictionary.
|
Constructor and Description |
---|
ListItems()
Construct the request
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
getBodyParameters()
Get body parameters
|
long |
getCount() |
java.lang.String |
getFilter() |
HTTPMethod |
getHTTPMethod() |
java.lang.String[] |
getIncludedProperties() |
long |
getOffset() |
java.lang.String |
getPath() |
java.util.Map<java.lang.String,java.lang.Object> |
getQueryParameters()
Get query parameters
|
boolean |
getReturnProperties() |
ListItems |
setCount(long count) |
ListItems |
setFilter(java.lang.String filter) |
ListItems |
setIncludedProperties(java.lang.String[] includedProperties) |
ListItems |
setOffset(long offset) |
ListItems |
setReturnProperties(boolean returnProperties) |
getEnsureHttps, getTimeout, setTimeout
protected java.lang.String filter
protected java.lang.Long count
protected java.lang.Long offset
protected java.lang.Boolean returnProperties
protected java.lang.String[] includedProperties
public ListItems setFilter(java.lang.String filter)
filter
- 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.public ListItems setCount(long count)
count
- The number of items to be listed.public ListItems setOffset(long offset)
offset
- Specifies the number of items to skip (ordered by `itemId`).public ListItems setReturnProperties(boolean returnProperties)
returnProperties
- 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"
}
]
```public ListItems setIncludedProperties(java.lang.String[] includedProperties)
includedProperties
- 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
}
]
```public java.lang.String getFilter()
public long getCount()
public long getOffset()
public boolean getReturnProperties()
public java.lang.String[] getIncludedProperties()
public HTTPMethod getHTTPMethod()
getHTTPMethod
in class Request
public java.lang.String getPath()
public java.util.Map<java.lang.String,java.lang.Object> getQueryParameters()
getQueryParameters
in class Request
public java.util.Map<java.lang.String,java.lang.Object> getBodyParameters()
getBodyParameters
in class Request