public class RecommendationFilter
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
RecommendationFilter.TimeUnit |
Constructor and Description |
---|
RecommendationFilter()
Creates an empty RecommendationFilter
|
Modifier and Type | Method and Description |
---|---|
void |
hasTag(java.lang.String tag,
boolean value)
Retrieved items must (not) have this tag
|
void |
inCategory(java.lang.String category,
boolean belongs)
Retrieved items must (not) belong to this category
|
void |
inLocation_city(java.lang.String location,
boolean value)
Retrieved items must (not) be in this location
|
void |
inLocation_simple(java.lang.String location,
boolean value)
Retrieved items must (not) be in this location
|
void |
inSegment(java.lang.String segment,
boolean belongs)
Retrieved items must (not) belong to this segment
|
void |
setLimit(int limit)
Maximum number of recommendations to be retrieved.
|
void |
setTime(long milliseconds)
Recommended items must be available at this precise point in time.
|
void |
setTime(long milliseconds,
java.lang.Integer radius,
RecommendationFilter.TimeUnit unit)
Recommended items must be available at any time in the given time window.
|
void |
setTime(java.lang.String time)
Recommended items must be available at this precise point in time.
|
void |
setTime(java.lang.String time,
java.lang.Integer radius,
RecommendationFilter.TimeUnit unit)
Recommended items must be available at any time in the given time window.
|
protected |
toQueryParams() |
public RecommendationFilter()
public void inCategory(java.lang.String category, boolean belongs)
category
- belongs
- public void inSegment(java.lang.String segment, boolean belongs)
segment
- belongs
- public void hasTag(java.lang.String tag, boolean value)
tag
- value
- public void inLocation_simple(java.lang.String location, boolean value)
location
- value
- public void inLocation_city(java.lang.String location, boolean value)
location
- value
- public void setLimit(int limit)
limit
- public void setTime(java.lang.String time)
time
- a timestamp in a supported format.public void setTime(long milliseconds)
milliseconds
- number of milliseconds that have passed since the UNIX epochpublic void setTime(long milliseconds, java.lang.Integer radius, RecommendationFilter.TimeUnit unit)
milliseconds
- number of milliseconds that have passed since the UNIX epochradius
- a time window.unit
- unit of the radius parameter (minutes, hours, days).public void setTime(java.lang.String time, java.lang.Integer radius, RecommendationFilter.TimeUnit unit)
time
- a timestamp in a supported format.radius
- a time window.unit
- unit of the radius parameter (minutes, hours, days).protectedtoQueryParams()