Class ConstructorIO
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstructorIO
(String apiToken, String apiKey, boolean isHTTPS, String host) Creates a constructor.io Client.ConstructorIO
(String apiToken, String apiKey, boolean isHTTPS, String host, int port) ConstructorIO
(String apiToken, String apiKey, boolean isHTTPS, String host, String constructorToken) Creates a constructor.io Client.ConstructorIO
(String apiToken, String apiKey, String constructorToken, boolean isHTTPS, String host, String basePath) Creates a constructor.io Client. -
Method Summary
Modifier and TypeMethodDescriptionQueries the redirects service for all redirectsQueries the redirects service for all redirectsallTasks
(AllTasksRequest req) Queries the tasks service for all tasksQueries the tasks service for all tasksautocomplete
(AutocompleteRequest req, UserInfo userInfo) Queries the autocomplete service.autocompleteAsJSON
(AutocompleteRequest req, UserInfo userInfo) Queries the autocomplete service.browse
(BrowseRequest req, UserInfo userInfo) Queries the browse service.void
browse
(BrowseRequest req, UserInfo userInfo, BrowseCallback c) Queries the browse service.browseAsJSON
(BrowseRequest req, UserInfo userInfo) Queries the browse service.Queries the browse facet options serviceQueries the browse facet options serviceQueries the browse facets serviceQueries the browse facets servicebrowseItems
(BrowseItemsRequest req, UserInfo userInfo) Queries the browse service with item id's.void
browseItems
(BrowseItemsRequest req, UserInfo userInfo, BrowseCallback c) Queries the browse service with item id's.browseItemsAsJSON
(BrowseItemsRequest req, UserInfo userInfo) Queries the browse service with item id's.createFacetConfiguration
(FacetConfigurationRequest facetConfigurationRequest) Create a facet configurationcreateOrReplaceItems
(ConstructorItem[] items) createOrReplaceItems
(ConstructorItem[] items, String section) createOrReplaceItems
(ConstructorItem[] items, String section, Boolean force) createOrReplaceItems
(ConstructorItem[] items, String section, Boolean force, String notificationEmail) Adds multiple items to your index whilst replacing existing ones (limit of 1,000 items)createOrReplaceVariations
(ConstructorVariation[] variations) createOrReplaceVariations
(ConstructorVariation[] variations, String section) createOrReplaceVariations
(ConstructorVariation[] variations, String section, Boolean force) createOrReplaceVariations
(ConstructorVariation[] variations, String section, Boolean force, String notificationEmail) Adds multiple variations to your index whilst replacing existing ones (limit of 1,000 items)deleteItems
(ConstructorItem[] items) deleteItems
(ConstructorItem[] items, String section) deleteItems
(ConstructorItem[] items, String section, Boolean force) deleteItems
(ConstructorItem[] items, String section, Boolean force, String notificationEmail) Deleted multiple items from your index (limit of 1,000 items)deleteVariations
(ConstructorVariation[] variations) deleteVariations
(ConstructorVariation[] variations, String section) deleteVariations
(ConstructorVariation[] variations, String section, Boolean force) deleteVariations
(ConstructorVariation[] variations, String section, Boolean force, String notificationEmail) Deletes multiple variations from your index (limit of 1,000 variations)static okhttp3.OkHttpClient
naturalLanguageSearch
(NaturalLanguageSearchRequest req, UserInfo userInfo) Queries the search service with natural language processing.naturalLanguageSearchAsJSON
(NaturalLanguageSearchRequest req, UserInfo userInfo) Queries the search service with natural language processing.Send a patch delta catalog to update specific items (delta)quizNextQuestion
(QuizRequest req, UserInfo userInfo) Queries the quiz service for a quiz questionquizNextQuestionAsJson
(QuizRequest req, UserInfo userInfo) Queries the quiz service for the a quiz questionquizResults
(QuizRequest req, UserInfo userInfo) Queries the quiz service for the quiz resultsquizResultsAsJson
(QuizRequest req, UserInfo userInfo) Queries the quiz service for the quiz resultsquizResultsConfig
(QuizResultsConfigRequest req, UserInfo userInfo) Queries the quiz service for the quiz results page configurationsquizResultsConfigAsJson
(QuizResultsConfigRequest req, UserInfo userInfo) Queries the quiz service for the quiz results configurationrecommendations
(RecommendationsRequest req, UserInfo userInfo) Queries the recommendations service to retrieve results.recommendationsAsJSON
(RecommendationsRequest req, UserInfo userInfo) Queries the recommendations service to retrieve results.Send a full catalog to replace the current one (sync)Retrieves the items service for itemsQueries the items service for itemsQueries the variations service for variationsQueries the variations service for variationssearch
(SearchRequest req, UserInfo userInfo) Queries the search service.void
search
(SearchRequest req, UserInfo userInfo, SearchCallback c) Queries the search service.searchAsJSON
(SearchRequest req, UserInfo userInfo) Queries the search service.void
Sets apiKeystatic void
setHttpClient
(okhttp3.OkHttpClient newClient) static void
setHttpClientConfig
(HttpClientConfig config) task
(TaskRequest req) Queries the task service for a task idtaskAsJson
(TaskRequest req) Queries the task service for a task idSend a partial catalog to update specific items (delta)updateItems
(ConstructorItem[] items) updateItems
(ConstructorItem[] items, String section) updateItems
(ConstructorItem[] items, String section, Boolean force) updateItems
(ConstructorItem[] items, String section, Boolean force, String notificationEmail) Updates items from your index.updateItems
(ConstructorItem[] items, String section, Boolean force, String notificationEmail, CatalogRequest.OnMissing onMissing) Updates items from your index.updateVariations
(ConstructorVariation[] variations) updateVariations
(ConstructorVariation[] variations, String section) updateVariations
(ConstructorVariation[] variations, String section, Boolean force) updateVariations
(ConstructorVariation[] variations, String section, Boolean force, String notificationEmail) Update variations from your index.updateVariations
(ConstructorVariation[] variations, String section, Boolean force, String notificationEmail, CatalogRequest.OnMissing onMissing) Update variations from your index.boolean
verify()
Verifies that an autocomplete service is working.
-
Field Details
-
apiToken
-
apiKey
-
protocol
-
host
-
basePath
-
port
-
version
-
constructorToken
-
-
Constructor Details
-
ConstructorIO
public ConstructorIO(String apiToken, String apiKey, boolean isHTTPS, String host, String constructorToken) Creates a constructor.io Client.- Parameters:
apiToken
- API Token, gotten from your Constructor.io Dashboard, and kept secret.apiKey
- API Key, used publicly in your in-site javascript client.isHTTPS
- true to use HTTPS, false to use HTTP. It is highly recommended that you use HTTPS.host
- The host of the autocomplete service that you are using. It is recommended that you let this value be null, in which case the host defaults to the Constructor.io autocomplete service at ac.cnstrc.com.constructorToken
- The token provided by Constructor to identify your company's traffic if proxying requests for results
-
ConstructorIO
public ConstructorIO(String apiToken, String apiKey, String constructorToken, boolean isHTTPS, String host, String basePath) Creates a constructor.io Client.- Parameters:
apiToken
- API Token, gotten from your Constructor.io Dashboard, and kept secret.apiKey
- API Key, used publicly in your in-site javascript client.constructorToken
- The token provided by Constructor to identify your company's traffic if proxying requests for resultsisHTTPS
- true to use HTTPS, false to use HTTP. It is highly recommended that you use HTTPS.host
- The host of the autocomplete service that you are using. It is recommended that you let this value be null, in which case the host defaults to the Constructor.io autocomplete service at ac.cnstrc.com.basePath
- The basePath to use with the host. It is recommended that you let this value be null, in which there will not be any base path.
-
ConstructorIO
Creates a constructor.io Client.- Parameters:
apiToken
- API Token, gotten from your Constructor.io Dashboard, and kept secret.apiKey
- API Key, used publicly in your in-site javascript client.isHTTPS
- true to use HTTPS, false to use HTTP. It is highly recommended that you use HTTPS.host
- The host of the autocomplete service that you are using. It is recommended that you let this value be null, in which case the host defaults to the Constructor.io autocomplete service at ac.cnstrc.com.
-
ConstructorIO
-
-
Method Details
-
setHttpClient
public static void setHttpClient(okhttp3.OkHttpClient newClient) - Parameters:
newClient
- the OkHttpClient to use by all instances
-
setHttpClientConfig
- Parameters:
config
- the Http client config
-
getHttpClient
public static okhttp3.OkHttpClient getHttpClient()- Returns:
- the HTTP client used by all instances
-
setApiKey
Sets apiKey -
verify
Verifies that an autocomplete service is working.- Returns:
- true if working.
- Throws:
ConstructorException
- if the service is not working
-
createOrReplaceItems
public String createOrReplaceItems(ConstructorItem[] items, String section, Boolean force, String notificationEmail) throws ConstructorException Adds multiple items to your index whilst replacing existing ones (limit of 1,000 items)- Parameters:
items
- the items you want to add or replace.section
- the section of the index that you're adding the items to.force
- whether or not the system should process the request even if it will invalidate a large number of existing items.notificationEmail
- An email address where you'd like to receive an email notification in case the task fails.- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
createOrReplaceItems
- Throws:
ConstructorException
-
createOrReplaceItems
public String createOrReplaceItems(ConstructorItem[] items, String section) throws ConstructorException - Throws:
ConstructorException
-
createOrReplaceItems
public String createOrReplaceItems(ConstructorItem[] items, String section, Boolean force) throws ConstructorException - Throws:
ConstructorException
-
deleteItems
public String deleteItems(ConstructorItem[] items, String section, Boolean force, String notificationEmail) throws ConstructorException Deleted multiple items from your index (limit of 1,000 items)- Parameters:
items
- the items that you are deletingsection
- the section of the index that you're removing the items from.force
- whether or not the system should process the request even if it will invalidate a large number of existing items.notificationEmail
- An email address where you'd like to receive an email notification in case the task fails.- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid
-
deleteItems
- Throws:
ConstructorException
-
deleteItems
- Throws:
ConstructorException
-
deleteItems
public String deleteItems(ConstructorItem[] items, String section, Boolean force) throws ConstructorException - Throws:
ConstructorException
-
retrieveItems
Retrieves the items service for items- Parameters:
req
- the items request- Returns:
- an ItemsResponse response
- Throws:
ConstructorException
- if the request is invalid.
-
retrieveItemsAsJson
Queries the items service for items- Parameters:
req
- the items request- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
deleteVariations
public String deleteVariations(ConstructorVariation[] variations, String section, Boolean force, String notificationEmail) throws ConstructorException Deletes multiple variations from your index (limit of 1,000 variations)- Parameters:
variations
- the variations that you are deletingsection
- the section of the autocomplete that you're removing the items from.force
- whether or not the system should process the request even if it will invalidate a large number of existing variations.notificationEmail
- An email address where you'd like to receive an email notification in case the task fails.- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid
-
deleteVariations
- Throws:
ConstructorException
-
deleteVariations
public String deleteVariations(ConstructorVariation[] variations, String section) throws ConstructorException - Throws:
ConstructorException
-
deleteVariations
public String deleteVariations(ConstructorVariation[] variations, String section, Boolean force) throws ConstructorException - Throws:
ConstructorException
-
updateItems
public String updateItems(ConstructorItem[] items, String section, Boolean force, String notificationEmail, CatalogRequest.OnMissing onMissing) throws ConstructorException Updates items from your index.- Parameters:
items
- the items that you're updatingsection
- the section of the autocomplete that you're modifying the item for.force
- whether or not the system should process the request even if it will invalidate a large number of existing items.notificationEmail
- An email address where you'd like to receive an email notification in case the task fails.onMissing
- Either "FAIL", "IGNORE", "CREATE", indicating how the system will handle updating items that don't exist. "FAIL" fails the ingestion if there are items that don't exist. "IGNORE" ignores items that don't exist. "CREATE" creates items that don't exist. Defaults to "FAIL".- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
updateItems
public String updateItems(ConstructorItem[] items, String section, Boolean force, String notificationEmail) throws ConstructorException Updates items from your index.- Parameters:
items
- the items that you're updatingsection
- the section of the autocomplete that you're modifying the item for.force
- whether or not the system should process the request even if it will invalidate a large number of existing items.notificationEmail
- An email address where you'd like to receive an email notification in case the task fails.- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
updateItems
- Throws:
ConstructorException
-
updateItems
- Throws:
ConstructorException
-
updateItems
public String updateItems(ConstructorItem[] items, String section, Boolean force) throws ConstructorException - Throws:
ConstructorException
-
updateVariations
public String updateVariations(ConstructorVariation[] variations, String section, Boolean force, String notificationEmail, CatalogRequest.OnMissing onMissing) throws ConstructorException Update variations from your index.- Parameters:
variations
- the variations that you're updating.section
- the section of the autocomplete that you're modifying the item for.force
- whether or not the system should process the request even if it will invalidate a large number of existing variations.notificationEmail
- An email address where you'd like to receive an email notification in case the task fails.onMissing
- Either "FAIL", "IGNORE", "CREATE", indicating how the system will handle updating variations that don't exist. "FAIL" fails the ingestion if there are items that don't exist. "IGNORE" ignores variations that don't exist. "CREATE" creates items that don't exist. Defaults to "FAIL".- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
updateVariations
public String updateVariations(ConstructorVariation[] variations, String section, Boolean force, String notificationEmail) throws ConstructorException Update variations from your index.- Parameters:
variations
- the variations that you're updating.section
- the section of the autocomplete that you're modifying the item for.force
- whether or not the system should process the request even if it will invalidate a large number of existing variations.notificationEmail
- An email address where you'd like to receive an email notification in case the task fails.- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
updateVariations
- Throws:
ConstructorException
-
updateVariations
public String updateVariations(ConstructorVariation[] variations, String section) throws ConstructorException - Throws:
ConstructorException
-
updateVariations
public String updateVariations(ConstructorVariation[] variations, String section, Boolean force) throws ConstructorException - Throws:
ConstructorException
-
createOrReplaceVariations
public String createOrReplaceVariations(ConstructorVariation[] variations, String section, Boolean force, String notificationEmail) throws ConstructorException Adds multiple variations to your index whilst replacing existing ones (limit of 1,000 items)- Parameters:
variations
- the items you want to add or replace.section
- the section of the autocomplete that you're adding the items to.force
- whether or not the system should process the request even if it will invalidate a large number of existing variations.notificationEmail
- An email address where you'd like to receive an email notification in case the task fails.- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
createOrReplaceVariations
public String createOrReplaceVariations(ConstructorVariation[] variations) throws ConstructorException - Throws:
ConstructorException
-
createOrReplaceVariations
public String createOrReplaceVariations(ConstructorVariation[] variations, String section) throws ConstructorException - Throws:
ConstructorException
-
createOrReplaceVariations
public String createOrReplaceVariations(ConstructorVariation[] variations, String section, Boolean force) throws ConstructorException - Throws:
ConstructorException
-
retrieveVariations
Queries the variations service for variations- Parameters:
req
- the variations request- Returns:
- an VariationsResponse response
- Throws:
ConstructorException
- if the request is invalid.
-
retrieveVariationsAsJson
Queries the variations service for variations- Parameters:
req
- the variations request- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
autocomplete
public AutocompleteResponse autocomplete(AutocompleteRequest req, UserInfo userInfo) throws ConstructorException Queries the autocomplete service.Note that if you're making an autocomplete request for a website, you should definitely use our javascript client instead of doing it server-side! That's important. That will be a solid latency difference.
- Parameters:
req
- the autocomplete requestuserInfo
- optional information about the user- Returns:
- an autocomplete response
- Throws:
ConstructorException
- if the request is invalid.
-
autocompleteAsJSON
public String autocompleteAsJSON(AutocompleteRequest req, UserInfo userInfo) throws ConstructorException Queries the autocomplete service.Note that if you're making an autocomplete request for a website, you should definitely use our javascript client instead of doing it server-side! That's important. That will be a solid latency difference.
- Parameters:
req
- the autocomplete requestuserInfo
- optional information about the user- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
search
Queries the search service.Note that if you're making a search request for a website, you should definitely use our javascript client instead of doing it server-side! That's important. That will be a solid latency difference.
- Parameters:
req
- the search requestuserInfo
- optional information about the user- Returns:
- a search response
- Throws:
ConstructorException
- if the request is invalid.
-
search
public void search(SearchRequest req, UserInfo userInfo, SearchCallback c) throws ConstructorException Queries the search service.Note that if you're making a search request for a website, you should definitely use our javascript client instead of doing it server-side! That's important. That will be a solid latency difference.
- Parameters:
req
- the search requestuserInfo
- optional information about the userc
- a callback with success and failure conditions- Throws:
ConstructorException
- if the request is invalid.
-
searchAsJSON
Queries the search service.Note that if you're making a search request for a website, you should definitely use our javascript client instead of doing it server-side! That's important. That will be a solid latency difference.
- Parameters:
req
- the search requestuserInfo
- optional information about the user- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
browse
Queries the browse service.Note that if you're making a browse request for a website, you should definitely use our javascript client instead of doing it server-side! That's important. That will be a solid latency difference.
- Parameters:
req
- the browse requestuserInfo
- optional information about the user- Returns:
- a browse response
- Throws:
ConstructorException
- if the request is invalid.
-
browse
public void browse(BrowseRequest req, UserInfo userInfo, BrowseCallback c) throws ConstructorException Queries the browse service.Note that if you're making a browse request for a website, you should definitely use our javascript client instead of doing it server-side! That's important. That will be a solid latency difference.
- Parameters:
req
- the browse requestuserInfo
- optional information about the userc
- a callback with success and failure conditions- Throws:
ConstructorException
- if the request is invalid.
-
browseAsJSON
Queries the browse service.Note that if you're making a browse request for a website, you should definitely use our javascript client instead of doing it server-side! That's important. That will be a solid latency difference.
- Parameters:
req
- the browse requestuserInfo
- optional information about the user- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
browseItems
public BrowseResponse browseItems(BrowseItemsRequest req, UserInfo userInfo) throws ConstructorException Queries the browse service with item id's.Note that if you're making a browse request for a website, you should definitely use our javascript client instead of doing it server-side! That's important. That will be a solid latency difference.
- Parameters:
req
- the browse items requestuserInfo
- optional information about the user- Returns:
- a browse response
- Throws:
ConstructorException
- if the request is invalid.
-
browseItems
public void browseItems(BrowseItemsRequest req, UserInfo userInfo, BrowseCallback c) throws ConstructorException Queries the browse service with item id's.Note that if you're making a browse request for a website, you should definitely use our javascript client instead of doing it server-side! That's important. That will be a solid latency difference.
- Parameters:
req
- the browse items requestuserInfo
- optional information about the userc
- a callback with success and failure conditions- Throws:
ConstructorException
- if the request is invalid.
-
browseItemsAsJSON
public String browseItemsAsJSON(BrowseItemsRequest req, UserInfo userInfo) throws ConstructorException Queries the browse service with item id's.Note that if you're making a browse request for a website, you should definitely use our javascript client instead of doing it server-side! That's important. That will be a solid latency difference.
- Parameters:
req
- the browse items requestuserInfo
- optional information about the user- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
browseFacets
Queries the browse facets service- Parameters:
req
- the browse facets request- Returns:
- a browse facets response
- Throws:
ConstructorException
- if the request is invalid.
-
browseFacetsAsJSON
Queries the browse facets service- Parameters:
req
- the browse facets request- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
browseFacetOptions
public BrowseFacetOptionsResponse browseFacetOptions(BrowseFacetOptionsRequest req) throws ConstructorException Queries the browse facet options service- Parameters:
req
- the browse facet options request- Returns:
- a browse facet options response
- Throws:
ConstructorException
- if the request is invalid.
-
browseFacetOptionsAsJSON
Queries the browse facet options service- Parameters:
req
- the browse facet options request- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
naturalLanguageSearch
public SearchResponse naturalLanguageSearch(NaturalLanguageSearchRequest req, UserInfo userInfo) throws ConstructorException Queries the search service with natural language processing.Note that if you're making a search request for a website, you should definitely use our javascript client instead of doing it server-side! That's important. That will be a solid latency difference.
- Parameters:
req
- the natural language search requestuserInfo
- optional information about the user- Returns:
- a search response
- Throws:
ConstructorException
- if the request is invalid.
-
naturalLanguageSearchAsJSON
public String naturalLanguageSearchAsJSON(NaturalLanguageSearchRequest req, UserInfo userInfo) throws ConstructorException Queries the search service with natural language processing.Note that if you're making a search request for a website, you should definitely use our javascript client instead of doing it server-side! That's important. That will be a solid latency difference.
- Parameters:
req
- the natural language search requestuserInfo
- optional information about the user- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
recommendations
public RecommendationsResponse recommendations(RecommendationsRequest req, UserInfo userInfo) throws ConstructorException Queries the recommendations service to retrieve results.Note that if you're making a recommendations request for a website, you should definitely use our javascript client instead of doing it server-side! That's important. That will be a solid latency difference.
- Parameters:
req
- the recommendations requestuserInfo
- optional information about the user- Returns:
- a recommendations response
- Throws:
ConstructorException
- if the request is invalid.
-
recommendationsAsJSON
public String recommendationsAsJSON(RecommendationsRequest req, UserInfo userInfo) throws ConstructorException Queries the recommendations service to retrieve results.Note that if you're making an recommendations request for a website, you should definitely use our javascript client instead of doing it server-side! That's important. That will be a solid latency difference.
- Parameters:
req
- the recommendations requestuserInfo
- optional information about the user- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
replaceCatalog
Send a full catalog to replace the current one (sync)- Parameters:
req
- the catalog request- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
updateCatalog
Send a partial catalog to update specific items (delta)- Parameters:
req
- the catalog request- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
patchCatalog
Send a patch delta catalog to update specific items (delta)- Parameters:
req
- the catalog request- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
allTasks
Queries the tasks service for all tasks- Parameters:
req
- the all tasks request- Returns:
- a all tasks response
- Throws:
ConstructorException
- if the request is invalid.
-
allTasksAsJson
Queries the tasks service for all tasks- Parameters:
req
- the all tasks request- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
task
Queries the task service for a task id- Parameters:
req
- the task request- Returns:
- a Task response
- Throws:
ConstructorException
- if the request is invalid.
-
taskAsJson
Queries the task service for a task id- Parameters:
req
- the task request- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
allRedirects
Queries the redirects service for all redirects- Parameters:
req
- the all redirects request- Returns:
- a all redirects response
- Throws:
ConstructorException
- if the request is invalid.
-
allRedirectsAsJson
Queries the redirects service for all redirects- Parameters:
req
- the all redirects request- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
quizNextQuestion
public QuizQuestionResponse quizNextQuestion(QuizRequest req, UserInfo userInfo) throws ConstructorException Queries the quiz service for a quiz question- Parameters:
req
- the Quiz request- Returns:
- a Quiz Question Response
- Throws:
ConstructorException
- if the request is invalid.
-
quizNextQuestionAsJson
public String quizNextQuestionAsJson(QuizRequest req, UserInfo userInfo) throws ConstructorException Queries the quiz service for the a quiz question- Parameters:
req
- the Quiz request- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
quizResults
public QuizResultsResponse quizResults(QuizRequest req, UserInfo userInfo) throws ConstructorException Queries the quiz service for the quiz results- Parameters:
req
- the Quiz request- Returns:
- a Quiz Results Response
- Throws:
ConstructorException
- if the request is invalid.
-
quizResultsAsJson
Queries the quiz service for the quiz results- Parameters:
req
- the Quiz request- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
quizResultsConfig
public QuizResultsConfigResponse quizResultsConfig(QuizResultsConfigRequest req, UserInfo userInfo) throws ConstructorException Queries the quiz service for the quiz results page configurations- Parameters:
req
- the Quiz Results Config request- Returns:
- a Quiz Results Config Response
- Throws:
ConstructorException
- if the request is invalid.
-
quizResultsConfigAsJson
public String quizResultsConfigAsJson(QuizResultsConfigRequest req, UserInfo userInfo) throws ConstructorException Queries the quiz service for the quiz results configuration- Parameters:
req
- the Quiz Results Config request- Returns:
- a string of JSON
- Throws:
ConstructorException
- if the request is invalid.
-
createFacetConfiguration
public String createFacetConfiguration(FacetConfigurationRequest facetConfigurationRequest) throws ConstructorException Create a facet configuration- Parameters:
facetConfigurationRequest
- the facet configuration request- Returns:
- returns the created facet
- Throws:
ConstructorException
- if the request is invalid.
-