public class Loop54Client extends java.lang.Object implements ILoop54Client
When issuing a request the user data will be used in this order of priority:
1. The UserMetaData provided in RequestContainer in the method call.
2. The IRemoteClientInfo gotten from the IRemoteClientInfoProvider
| Constructor and Description |
|---|
Loop54Client(IRequestManager requestManager,
IRemoteClientInfoProvider remoteClientInfoProvider) |
public Loop54Client(IRequestManager requestManager, IRemoteClientInfoProvider remoteClientInfoProvider)
requestManager - The IRequestManager to use when making calls to the api. Must not be null.remoteClientInfoProvider - The IRemoteClientInfoProvider.public IRequestManager getRequestManager()
public SearchResponse search(SearchRequest request) throws Loop54Exception
search in interface ILoop54ClientLoop54Exceptionpublic SearchResponse search(RequestContainer<SearchRequest> request) throws Loop54Exception
search in interface ILoop54ClientLoop54Exceptionpublic java.util.concurrent.CompletableFuture<SearchResponse> searchAsync(SearchRequest request)
searchAsync in interface ILoop54Clientpublic java.util.concurrent.CompletableFuture<SearchResponse> searchAsync(RequestContainer<SearchRequest> request)
searchAsync in interface ILoop54Clientpublic GetEntitiesResponse getEntities(GetEntitiesRequest request) throws Loop54Exception
getEntities in interface ILoop54ClientLoop54Exceptionpublic GetEntitiesResponse getEntities(RequestContainer<GetEntitiesRequest> request) throws Loop54Exception
getEntities in interface ILoop54ClientLoop54Exceptionpublic java.util.concurrent.CompletableFuture<GetEntitiesResponse> getEntitiesAsync(GetEntitiesRequest request)
getEntitiesAsync in interface ILoop54Clientpublic java.util.concurrent.CompletableFuture<GetEntitiesResponse> getEntitiesAsync(RequestContainer<GetEntitiesRequest> request)
getEntitiesAsync in interface ILoop54Clientpublic GetEntitiesByAttributeResponse getEntitiesByAttribute(GetEntitiesByAttributeRequest request) throws Loop54Exception
getEntitiesByAttribute in interface ILoop54ClientLoop54Exceptionpublic GetEntitiesByAttributeResponse getEntitiesByAttribute(RequestContainer<GetEntitiesByAttributeRequest> request) throws Loop54Exception
getEntitiesByAttribute in interface ILoop54ClientLoop54Exceptionpublic java.util.concurrent.CompletableFuture<GetEntitiesByAttributeResponse> getEntitiesByAttributeAsync(GetEntitiesByAttributeRequest request)
getEntitiesByAttributeAsync in interface ILoop54Clientpublic java.util.concurrent.CompletableFuture<GetEntitiesByAttributeResponse> getEntitiesByAttributeAsync(RequestContainer<GetEntitiesByAttributeRequest> request)
getEntitiesByAttributeAsync in interface ILoop54Clientpublic AutoCompleteResponse autoComplete(AutoCompleteRequest request) throws Loop54Exception
autoComplete in interface ILoop54ClientLoop54Exceptionpublic AutoCompleteResponse autoComplete(RequestContainer<AutoCompleteRequest> request) throws Loop54Exception
autoComplete in interface ILoop54ClientLoop54Exceptionpublic java.util.concurrent.CompletableFuture<AutoCompleteResponse> autoCompleteAsync(AutoCompleteRequest request)
autoCompleteAsync in interface ILoop54Clientpublic java.util.concurrent.CompletableFuture<AutoCompleteResponse> autoCompleteAsync(RequestContainer<AutoCompleteRequest> request)
autoCompleteAsync in interface ILoop54Clientpublic GetRelatedEntitiesResponse getRelatedEntities(GetRelatedEntitiesRequest request) throws Loop54Exception
getRelatedEntities in interface ILoop54ClientLoop54Exceptionpublic GetRelatedEntitiesResponse getRelatedEntities(RequestContainer<GetRelatedEntitiesRequest> request) throws Loop54Exception
getRelatedEntities in interface ILoop54ClientLoop54Exceptionpublic java.util.concurrent.CompletableFuture<GetRelatedEntitiesResponse> getRelatedEntitiesAsync(GetRelatedEntitiesRequest request)
getRelatedEntitiesAsync in interface ILoop54Clientpublic java.util.concurrent.CompletableFuture<GetRelatedEntitiesResponse> getRelatedEntitiesAsync(RequestContainer<GetRelatedEntitiesRequest> request)
getRelatedEntitiesAsync in interface ILoop54Clientpublic GetComplementaryEntitiesResponse getComplementaryEntities(GetComplementaryEntitiesRequest request) throws Loop54Exception
getComplementaryEntities in interface ILoop54ClientLoop54Exceptionpublic GetComplementaryEntitiesResponse getComplementaryEntities(RequestContainer<GetComplementaryEntitiesRequest> request) throws Loop54Exception
getComplementaryEntities in interface ILoop54ClientLoop54Exceptionpublic java.util.concurrent.CompletableFuture<GetComplementaryEntitiesResponse> getComplementaryEntitiesAsync(GetComplementaryEntitiesRequest request)
getComplementaryEntitiesAsync in interface ILoop54Clientpublic java.util.concurrent.CompletableFuture<GetComplementaryEntitiesResponse> getComplementaryEntitiesAsync(RequestContainer<GetComplementaryEntitiesRequest> request)
getComplementaryEntitiesAsync in interface ILoop54Clientpublic GetBasketRecommendationsResponse getBasketRecommendations(GetBasketRecommendationsRequest request) throws Loop54Exception
getBasketRecommendations in interface ILoop54ClientLoop54Exceptionpublic GetBasketRecommendationsResponse getBasketRecommendations(RequestContainer<GetBasketRecommendationsRequest> request) throws Loop54Exception
getBasketRecommendations in interface ILoop54ClientLoop54Exceptionpublic java.util.concurrent.CompletableFuture<GetBasketRecommendationsResponse> getBasketRecommendationsAsync(GetBasketRecommendationsRequest request)
getBasketRecommendationsAsync in interface ILoop54Clientpublic java.util.concurrent.CompletableFuture<GetBasketRecommendationsResponse> getBasketRecommendationsAsync(RequestContainer<GetBasketRecommendationsRequest> request)
getBasketRecommendationsAsync in interface ILoop54Clientpublic GetRecommendedEntitiesResponse getRecommendedEntities(GetRecommendedEntitiesRequest request) throws Loop54Exception
getRecommendedEntities in interface ILoop54ClientLoop54Exceptionpublic GetRecommendedEntitiesResponse getRecommendedEntities(RequestContainer<GetRecommendedEntitiesRequest> request) throws Loop54Exception
getRecommendedEntities in interface ILoop54ClientLoop54Exceptionpublic java.util.concurrent.CompletableFuture<GetRecommendedEntitiesResponse> getRecommendedEntitiesAsync(GetRecommendedEntitiesRequest request)
getRecommendedEntitiesAsync in interface ILoop54Clientpublic java.util.concurrent.CompletableFuture<GetRecommendedEntitiesResponse> getRecommendedEntitiesAsync(RequestContainer<GetRecommendedEntitiesRequest> request)
getRecommendedEntitiesAsync in interface ILoop54Clientpublic GetPopularEntitiesResponse getPopularEntities(GetPopularEntitiesRequest request) throws Loop54Exception
getPopularEntities in interface ILoop54ClientLoop54Exceptionpublic GetPopularEntitiesResponse getPopularEntities(RequestContainer<GetPopularEntitiesRequest> request) throws Loop54Exception
getPopularEntities in interface ILoop54ClientLoop54Exceptionpublic java.util.concurrent.CompletableFuture<GetPopularEntitiesResponse> getPopularEntitiesAsync(GetPopularEntitiesRequest request)
getPopularEntitiesAsync in interface ILoop54Clientpublic java.util.concurrent.CompletableFuture<GetPopularEntitiesResponse> getPopularEntitiesAsync(RequestContainer<GetPopularEntitiesRequest> request)
getPopularEntitiesAsync in interface ILoop54Clientpublic GetRecentEntitiesResponse getRecentEntities(GetRecentEntitiesRequest request) throws Loop54Exception
getRecentEntities in interface ILoop54ClientLoop54Exceptionpublic GetRecentEntitiesResponse getRecentEntities(RequestContainer<GetRecentEntitiesRequest> request) throws Loop54Exception
getRecentEntities in interface ILoop54ClientLoop54Exceptionpublic java.util.concurrent.CompletableFuture<GetRecentEntitiesResponse> getRecentEntitiesAsync(GetRecentEntitiesRequest request)
getRecentEntitiesAsync in interface ILoop54Clientpublic java.util.concurrent.CompletableFuture<GetRecentEntitiesResponse> getRecentEntitiesAsync(RequestContainer<GetRecentEntitiesRequest> request)
getRecentEntitiesAsync in interface ILoop54Clientpublic Response sync() throws Loop54Exception
sync in interface ILoop54ClientLoop54Exceptionpublic Response sync(Request request) throws Loop54Exception
sync in interface ILoop54ClientLoop54Exceptionpublic Response sync(RequestContainer<Request> request) throws Loop54Exception
sync in interface ILoop54ClientLoop54Exceptionpublic java.util.concurrent.CompletableFuture<Response> syncAsync()
syncAsync in interface ILoop54Clientpublic java.util.concurrent.CompletableFuture<Response> syncAsync(Request request)
syncAsync in interface ILoop54Clientpublic java.util.concurrent.CompletableFuture<Response> syncAsync(RequestContainer<Request> request)
syncAsync in interface ILoop54Clientpublic Response createEvents(CreateEventsRequest request) throws Loop54Exception
createEvents in interface ILoop54ClientLoop54Exceptionpublic Response createEvents(RequestContainer<CreateEventsRequest> request) throws Loop54Exception
createEvents in interface ILoop54ClientLoop54Exceptionpublic java.util.concurrent.CompletableFuture<Response> createEventsAsync(CreateEventsRequest request)
createEventsAsync in interface ILoop54Clientpublic java.util.concurrent.CompletableFuture<Response> createEventsAsync(RequestContainer<CreateEventsRequest> request)
createEventsAsync in interface ILoop54Clientpublic Response customCall(java.lang.String name, Request request) throws Loop54Exception
customCall in interface ILoop54ClientLoop54Exceptionpublic Response customCall(java.lang.String name, RequestContainer<Request> request) throws Loop54Exception
customCall in interface ILoop54ClientLoop54Exceptionpublic java.util.concurrent.CompletableFuture<Response> customCallAsync(java.lang.String name, Request request)
customCallAsync in interface ILoop54Clientpublic java.util.concurrent.CompletableFuture<Response> customCallAsync(java.lang.String name, RequestContainer<Request> request)
customCallAsync in interface ILoop54Clientpublic static <T extends Request> RequestContainer<T> getRequestContainer(T requestData, UserMetaData metaDataOverrides)
T - The type of the request data to add overrides to.requestData - The request data to wrap in a container. For instance a SearchRequest.metaDataOverrides - Use these overrides to force certain values to take effect in the api call. For instance
if you set the UserMetaData.userId it will trump any data from a IRemoteClientInfo! This
could be useful if you want to use an internal customer id of a logged in user.RequestContainer wrapping the Request.public static <T extends Request> RequestContainer<T> getRequestContainer(T requestData)