Package com.algolia.api
Class InsightsClient
java.lang.Object
com.algolia.ApiClient
com.algolia.api.InsightsClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionInsightsClient
(String appId, String apiKey) InsightsClient
(String appId, String apiKey, ClientOptions options) InsightsClient
(String appId, String apiKey, String region) InsightsClient
(String appId, String apiKey, String region, ClientOptions options) -
Method Summary
Modifier and TypeMethodDescriptioncustomDelete
(String path) This method allow you to send requests to the Algolia REST API.customDelete
(String path, RequestOptions requestOptions) This method allow you to send requests to the Algolia REST API.customDelete
(String path, Map<String, Object> parameters) This method allow you to send requests to the Algolia REST API.customDelete
(String path, Map<String, Object> parameters, RequestOptions requestOptions) This method allow you to send requests to the Algolia REST API.customDeleteAsync
(String path) (asynchronously) This method allow you to send requests to the Algolia REST API.customDeleteAsync
(String path, RequestOptions requestOptions) (asynchronously) This method allow you to send requests to the Algolia REST API.customDeleteAsync
(String path, Map<String, Object> parameters) (asynchronously) This method allow you to send requests to the Algolia REST API.customDeleteAsync
(String path, Map<String, Object> parameters, RequestOptions requestOptions) (asynchronously) This method allow you to send requests to the Algolia REST API.This method allow you to send requests to the Algolia REST API.customGet
(String path, RequestOptions requestOptions) This method allow you to send requests to the Algolia REST API.This method allow you to send requests to the Algolia REST API.This method allow you to send requests to the Algolia REST API.customGetAsync
(String path) (asynchronously) This method allow you to send requests to the Algolia REST API.customGetAsync
(String path, RequestOptions requestOptions) (asynchronously) This method allow you to send requests to the Algolia REST API.customGetAsync
(String path, Map<String, Object> parameters) (asynchronously) This method allow you to send requests to the Algolia REST API.customGetAsync
(String path, Map<String, Object> parameters, RequestOptions requestOptions) (asynchronously) This method allow you to send requests to the Algolia REST API.customPost
(String path) This method allow you to send requests to the Algolia REST API.customPost
(String path, RequestOptions requestOptions) This method allow you to send requests to the Algolia REST API.This method allow you to send requests to the Algolia REST API.customPost
(String path, Map<String, Object> parameters, Object body, RequestOptions requestOptions) This method allow you to send requests to the Algolia REST API.customPostAsync
(String path) (asynchronously) This method allow you to send requests to the Algolia REST API.customPostAsync
(String path, RequestOptions requestOptions) (asynchronously) This method allow you to send requests to the Algolia REST API.(asynchronously) This method allow you to send requests to the Algolia REST API.customPostAsync
(String path, Map<String, Object> parameters, Object body, RequestOptions requestOptions) (asynchronously) This method allow you to send requests to the Algolia REST API.This method allow you to send requests to the Algolia REST API.customPut
(String path, RequestOptions requestOptions) This method allow you to send requests to the Algolia REST API.This method allow you to send requests to the Algolia REST API.This method allow you to send requests to the Algolia REST API.customPutAsync
(String path) (asynchronously) This method allow you to send requests to the Algolia REST API.customPutAsync
(String path, RequestOptions requestOptions) (asynchronously) This method allow you to send requests to the Algolia REST API.(asynchronously) This method allow you to send requests to the Algolia REST API.customPutAsync
(String path, Map<String, Object> parameters, Object body, RequestOptions requestOptions) (asynchronously) This method allow you to send requests to the Algolia REST API.void
deleteUserToken
(String userToken) Deletes all events related to the specified user token from events metrics and analytics.void
deleteUserToken
(String userToken, RequestOptions requestOptions) Deletes all events related to the specified user token from events metrics and analytics.deleteUserTokenAsync
(String userToken) (asynchronously) Deletes all events related to the specified user token from events metrics and analytics.deleteUserTokenAsync
(String userToken, RequestOptions requestOptions) (asynchronously) Deletes all events related to the specified user token from events metrics and analytics.pushEvents
(InsightsEvents insightsEvents) Sends a list of events to the Insights API.pushEvents
(InsightsEvents insightsEvents, RequestOptions requestOptions) Sends a list of events to the Insights API.pushEventsAsync
(InsightsEvents insightsEvents) (asynchronously) Sends a list of events to the Insights API.pushEventsAsync
(InsightsEvents insightsEvents, RequestOptions requestOptions) (asynchronously) Sends a list of events to the Insights API.Methods inherited from class com.algolia.ApiClient
close, executeAsync, executeAsync, setClientApiKey
-
Constructor Details
-
InsightsClient
-
InsightsClient
-
InsightsClient
-
InsightsClient
-
-
Method Details
-
customDelete
public Object customDelete(@Nonnull String path, Map<String, Object> parameters, RequestOptions requestOptions) throws AlgoliaRuntimeExceptionThis method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)parameters
- Query parameters to apply to the current query. (optional)requestOptions
- The requestOptions to send along with the query, they will be merged with the transporter requestOptions.- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customDelete
public Object customDelete(@Nonnull String path, Map<String, Object> parameters) throws AlgoliaRuntimeExceptionThis method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)parameters
- Query parameters to apply to the current query. (optional)- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customDelete
public Object customDelete(@Nonnull String path, RequestOptions requestOptions) throws AlgoliaRuntimeException This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)requestOptions
- The requestOptions to send along with the query, they will be merged with the transporter requestOptions.- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customDelete
This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customDeleteAsync
public CompletableFuture<Object> customDeleteAsync(@Nonnull String path, Map<String, Object> parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException(asynchronously) This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)parameters
- Query parameters to apply to the current query. (optional)requestOptions
- The requestOptions to send along with the query, they will be merged with the transporter requestOptions.- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customDeleteAsync
public CompletableFuture<Object> customDeleteAsync(@Nonnull String path, Map<String, Object> parameters) throws AlgoliaRuntimeException(asynchronously) This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)parameters
- Query parameters to apply to the current query. (optional)- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customDeleteAsync
public CompletableFuture<Object> customDeleteAsync(@Nonnull String path, RequestOptions requestOptions) throws AlgoliaRuntimeException (asynchronously) This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)requestOptions
- The requestOptions to send along with the query, they will be merged with the transporter requestOptions.- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customDeleteAsync
public CompletableFuture<Object> customDeleteAsync(@Nonnull String path) throws AlgoliaRuntimeException (asynchronously) This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customGet
public Object customGet(@Nonnull String path, Map<String, Object> parameters, RequestOptions requestOptions) throws AlgoliaRuntimeExceptionThis method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)parameters
- Query parameters to apply to the current query. (optional)requestOptions
- The requestOptions to send along with the query, they will be merged with the transporter requestOptions.- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customGet
public Object customGet(@Nonnull String path, Map<String, Object> parameters) throws AlgoliaRuntimeExceptionThis method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)parameters
- Query parameters to apply to the current query. (optional)- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customGet
public Object customGet(@Nonnull String path, RequestOptions requestOptions) throws AlgoliaRuntimeException This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)requestOptions
- The requestOptions to send along with the query, they will be merged with the transporter requestOptions.- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customGet
This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customGetAsync
public CompletableFuture<Object> customGetAsync(@Nonnull String path, Map<String, Object> parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException(asynchronously) This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)parameters
- Query parameters to apply to the current query. (optional)requestOptions
- The requestOptions to send along with the query, they will be merged with the transporter requestOptions.- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customGetAsync
public CompletableFuture<Object> customGetAsync(@Nonnull String path, Map<String, Object> parameters) throws AlgoliaRuntimeException(asynchronously) This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)parameters
- Query parameters to apply to the current query. (optional)- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customGetAsync
public CompletableFuture<Object> customGetAsync(@Nonnull String path, RequestOptions requestOptions) throws AlgoliaRuntimeException (asynchronously) This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)requestOptions
- The requestOptions to send along with the query, they will be merged with the transporter requestOptions.- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customGetAsync
public CompletableFuture<Object> customGetAsync(@Nonnull String path) throws AlgoliaRuntimeException (asynchronously) This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customPost
public Object customPost(@Nonnull String path, Map<String, Object> parameters, Object body, RequestOptions requestOptions) throws AlgoliaRuntimeExceptionThis method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)parameters
- Query parameters to apply to the current query. (optional)body
- Parameters to send with the custom request. (optional)requestOptions
- The requestOptions to send along with the query, they will be merged with the transporter requestOptions.- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customPost
public Object customPost(@Nonnull String path, Map<String, Object> parameters, Object body) throws AlgoliaRuntimeExceptionThis method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)parameters
- Query parameters to apply to the current query. (optional)body
- Parameters to send with the custom request. (optional)- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customPost
public Object customPost(@Nonnull String path, RequestOptions requestOptions) throws AlgoliaRuntimeException This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)requestOptions
- The requestOptions to send along with the query, they will be merged with the transporter requestOptions.- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customPost
This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customPostAsync
public CompletableFuture<Object> customPostAsync(@Nonnull String path, Map<String, Object> parameters, Object body, RequestOptions requestOptions) throws AlgoliaRuntimeException(asynchronously) This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)parameters
- Query parameters to apply to the current query. (optional)body
- Parameters to send with the custom request. (optional)requestOptions
- The requestOptions to send along with the query, they will be merged with the transporter requestOptions.- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customPostAsync
public CompletableFuture<Object> customPostAsync(@Nonnull String path, Map<String, Object> parameters, Object body) throws AlgoliaRuntimeException(asynchronously) This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)parameters
- Query parameters to apply to the current query. (optional)body
- Parameters to send with the custom request. (optional)- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customPostAsync
public CompletableFuture<Object> customPostAsync(@Nonnull String path, RequestOptions requestOptions) throws AlgoliaRuntimeException (asynchronously) This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)requestOptions
- The requestOptions to send along with the query, they will be merged with the transporter requestOptions.- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customPostAsync
public CompletableFuture<Object> customPostAsync(@Nonnull String path) throws AlgoliaRuntimeException (asynchronously) This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customPut
public Object customPut(@Nonnull String path, Map<String, Object> parameters, Object body, RequestOptions requestOptions) throws AlgoliaRuntimeExceptionThis method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)parameters
- Query parameters to apply to the current query. (optional)body
- Parameters to send with the custom request. (optional)requestOptions
- The requestOptions to send along with the query, they will be merged with the transporter requestOptions.- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customPut
public Object customPut(@Nonnull String path, Map<String, Object> parameters, Object body) throws AlgoliaRuntimeExceptionThis method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)parameters
- Query parameters to apply to the current query. (optional)body
- Parameters to send with the custom request. (optional)- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customPut
public Object customPut(@Nonnull String path, RequestOptions requestOptions) throws AlgoliaRuntimeException This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)requestOptions
- The requestOptions to send along with the query, they will be merged with the transporter requestOptions.- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customPut
This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customPutAsync
public CompletableFuture<Object> customPutAsync(@Nonnull String path, Map<String, Object> parameters, Object body, RequestOptions requestOptions) throws AlgoliaRuntimeException(asynchronously) This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)parameters
- Query parameters to apply to the current query. (optional)body
- Parameters to send with the custom request. (optional)requestOptions
- The requestOptions to send along with the query, they will be merged with the transporter requestOptions.- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customPutAsync
public CompletableFuture<Object> customPutAsync(@Nonnull String path, Map<String, Object> parameters, Object body) throws AlgoliaRuntimeException(asynchronously) This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)parameters
- Query parameters to apply to the current query. (optional)body
- Parameters to send with the custom request. (optional)- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customPutAsync
public CompletableFuture<Object> customPutAsync(@Nonnull String path, RequestOptions requestOptions) throws AlgoliaRuntimeException (asynchronously) This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)requestOptions
- The requestOptions to send along with the query, they will be merged with the transporter requestOptions.- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
customPutAsync
public CompletableFuture<Object> customPutAsync(@Nonnull String path) throws AlgoliaRuntimeException (asynchronously) This method allow you to send requests to the Algolia REST API.- Parameters:
path
- Path of the endpoint, anything after \"/1\" must be specified. (required)- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
deleteUserToken
public void deleteUserToken(@Nonnull String userToken, RequestOptions requestOptions) throws AlgoliaRuntimeException Deletes all events related to the specified user token from events metrics and analytics. The deletion is asynchronous, and processed within 48 hours. To delete a personalization user profile, see `Delete a user profile` in the Personalization API.- Parameters:
userToken
- User token for which to delete all associated events. (required)requestOptions
- The requestOptions to send along with the query, they will be merged with the transporter requestOptions.- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
deleteUserToken
Deletes all events related to the specified user token from events metrics and analytics. The deletion is asynchronous, and processed within 48 hours. To delete a personalization user profile, see `Delete a user profile` in the Personalization API.- Parameters:
userToken
- User token for which to delete all associated events. (required)- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
deleteUserTokenAsync
public CompletableFuture<Void> deleteUserTokenAsync(@Nonnull String userToken, RequestOptions requestOptions) throws AlgoliaRuntimeException (asynchronously) Deletes all events related to the specified user token from events metrics and analytics. The deletion is asynchronous, and processed within 48 hours. To delete a personalization user profile, see `Delete a user profile` in the Personalization API.- Parameters:
userToken
- User token for which to delete all associated events. (required)requestOptions
- The requestOptions to send along with the query, they will be merged with the transporter requestOptions.- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
deleteUserTokenAsync
public CompletableFuture<Void> deleteUserTokenAsync(@Nonnull String userToken) throws AlgoliaRuntimeException (asynchronously) Deletes all events related to the specified user token from events metrics and analytics. The deletion is asynchronous, and processed within 48 hours. To delete a personalization user profile, see `Delete a user profile` in the Personalization API.- Parameters:
userToken
- User token for which to delete all associated events. (required)- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
pushEvents
public EventsResponse pushEvents(@Nonnull InsightsEvents insightsEvents, RequestOptions requestOptions) throws AlgoliaRuntimeException Sends a list of events to the Insights API. You can include up to 1,000 events in a single request, but the request body must be smaller than 2 MB.- Parameters:
insightsEvents
- (required)requestOptions
- The requestOptions to send along with the query, they will be merged with the transporter requestOptions.- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
pushEvents
public EventsResponse pushEvents(@Nonnull InsightsEvents insightsEvents) throws AlgoliaRuntimeException Sends a list of events to the Insights API. You can include up to 1,000 events in a single request, but the request body must be smaller than 2 MB.- Parameters:
insightsEvents
- (required)- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
pushEventsAsync
public CompletableFuture<EventsResponse> pushEventsAsync(@Nonnull InsightsEvents insightsEvents, RequestOptions requestOptions) throws AlgoliaRuntimeException (asynchronously) Sends a list of events to the Insights API. You can include up to 1,000 events in a single request, but the request body must be smaller than 2 MB.- Parameters:
insightsEvents
- (required)requestOptions
- The requestOptions to send along with the query, they will be merged with the transporter requestOptions.- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-
pushEventsAsync
public CompletableFuture<EventsResponse> pushEventsAsync(@Nonnull InsightsEvents insightsEvents) throws AlgoliaRuntimeException (asynchronously) Sends a list of events to the Insights API. You can include up to 1,000 events in a single request, but the request body must be smaller than 2 MB.- Parameters:
insightsEvents
- (required)- Throws:
AlgoliaRuntimeException
- If it fails to process the API call
-