Package io.constructor.client
Class BrowseRequest
java.lang.Object
io.constructor.client.BrowseRequest
Constructor.io Browse Request
-
Constructor Summary
ConstructorDescriptionBrowseRequest
(String filterName, String filterValue) Creates a browse request -
Method Summary
Modifier and TypeMethodDescriptiongetNow()
int
int
getPage()
int
boolean
void
void
setFilterMatchTypes
(Map<String, String> filterMatchTypes) void
setFilterName
(String filterName) void
setFilterValue
(String filterValue) void
setFormatOptions
(Map<String, String> formatOptions) void
setGroupId
(String groupId) void
setHiddenFacets
(List<String> hiddenFacets) void
setHiddenFields
(List<String> hiddenFields) void
void
setOffset
(int offset) void
setPage
(int page) void
setPreFilterExpression
(String preFilterExpression) void
setQsParam
(String qsParam) void
setResultsPerPage
(int resultsPerPage) void
setSection
(String section) void
setSortAscending
(boolean sortAscending) void
void
setVariationsMap
(VariationsMap variationsMap)
-
Constructor Details
-
BrowseRequest
Creates a browse request- Parameters:
filterName
- filter name to display results fromfilterValue
- filter value to display results from- Throws:
IllegalArgumentException
-
-
Method Details
-
setFilterName
- Parameters:
filterName
- the filterName to set
-
getFilterName
- Returns:
- the filterName
-
setFilterValue
- Parameters:
filterValue
- the filterValue to set
-
getFilterValue
- Returns:
- the filterValue
-
getSection
- Returns:
- the section
-
setSection
- Parameters:
section
- the section to set
-
getPage
public int getPage()- Returns:
- the page
-
setPage
public void setPage(int page) - Parameters:
page
- the page to set (Can't be used together with the 'offset' parameter)
-
getResultsPerPage
public int getResultsPerPage()- Returns:
- the resultsPerPage
-
setResultsPerPage
public void setResultsPerPage(int resultsPerPage) - Parameters:
resultsPerPage
- the resultsPerPage to set
-
getGroupId
- Returns:
- the groupId
-
setGroupId
- Parameters:
groupId
- the groupId to set
-
setFacets
- Parameters:
facets
- the facets to set
-
getFacets
- Returns:
- the facets
-
setSortBy
- Parameters:
sortBy
- the sortBy to set
-
getSortBy
- Returns:
- the sortBy
-
setSortAscending
public void setSortAscending(boolean sortAscending) - Parameters:
sortAscending
- the sortAscending to set
-
getSortAscending
public boolean getSortAscending()- Returns:
- the sortAscending
-
setFormatOptions
- Parameters:
formatOptions
- the formatOptions to set. Please refer to https://docs.constructor.com/reference/v1-search-get-search-results for details
-
getFormatOptions
- Returns:
- the format options
-
setHiddenFields
- Parameters:
hiddenFields
- the hiddenFields to set
-
getHiddenFields
- Returns:
- the hidden fields
-
setHiddenFacets
- Parameters:
hiddenFacets
- the hiddenFacets to set
-
getHiddenFacets
- Returns:
- the hidden facets
-
setVariationsMap
- Parameters:
variationsMap
- the variationsMap to set
-
getVariationsMap
- Returns:
- the variations map
-
setPreFilterExpression
- Parameters:
preFilterExpression
- the faceting expression to scope search results (JSON-encoded query string). Please refer to https://docs.constructor.com/reference/configuration-collections
-
getPreFilterExpression
- Returns:
- the prefilter expression
-
setQsParam
- Parameters:
qsParam
- any parameters listed in the API documentation can be serialized into a JSON object and parsed through this parameter. Please refer to https://docs.constructor.com/reference/v1-search-get-search-results/
-
getQsParam
- Returns:
- the qs parameter
-
setNow
- Parameters:
now
- a unix epoch timestamp used to emulate "past" and "future" requests. Please refer to https://docs.constructor.com/reference/v1-search-get-search-results/
-
getNow
- Returns:
- the now parameter
-
setOffset
public void setOffset(int offset) - Parameters:
offset
- the number of results to skip from the beginning (Can't be used together with the 'page' parameter).
-
getOffset
public int getOffset()- Returns:
- the offset
-
setFilterMatchTypes
- Parameters:
filterMatchTypes
- the filterMatchTypes to set. Please refer to https://docs.constructor.com/reference/v1-browse-get-browse-results for details Possible values 'all', 'any' or 'none'
-
getFilterMatchTypes
- Returns:
- the filterMatchTypes
-