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 ILoop54Client
Loop54Exception
public SearchResponse search(RequestContainer<SearchRequest> request) throws Loop54Exception
search
in interface ILoop54Client
Loop54Exception
public java.util.concurrent.CompletableFuture<SearchResponse> searchAsync(SearchRequest request)
searchAsync
in interface ILoop54Client
public java.util.concurrent.CompletableFuture<SearchResponse> searchAsync(RequestContainer<SearchRequest> request)
searchAsync
in interface ILoop54Client
public GetEntitiesResponse getEntities(GetEntitiesRequest request) throws Loop54Exception
getEntities
in interface ILoop54Client
Loop54Exception
public GetEntitiesResponse getEntities(RequestContainer<GetEntitiesRequest> request) throws Loop54Exception
getEntities
in interface ILoop54Client
Loop54Exception
public java.util.concurrent.CompletableFuture<GetEntitiesResponse> getEntitiesAsync(GetEntitiesRequest request)
getEntitiesAsync
in interface ILoop54Client
public java.util.concurrent.CompletableFuture<GetEntitiesResponse> getEntitiesAsync(RequestContainer<GetEntitiesRequest> request)
getEntitiesAsync
in interface ILoop54Client
public GetEntitiesByAttributeResponse getEntitiesByAttribute(GetEntitiesByAttributeRequest request) throws Loop54Exception
getEntitiesByAttribute
in interface ILoop54Client
Loop54Exception
public GetEntitiesByAttributeResponse getEntitiesByAttribute(RequestContainer<GetEntitiesByAttributeRequest> request) throws Loop54Exception
getEntitiesByAttribute
in interface ILoop54Client
Loop54Exception
public java.util.concurrent.CompletableFuture<GetEntitiesByAttributeResponse> getEntitiesByAttributeAsync(GetEntitiesByAttributeRequest request)
getEntitiesByAttributeAsync
in interface ILoop54Client
public java.util.concurrent.CompletableFuture<GetEntitiesByAttributeResponse> getEntitiesByAttributeAsync(RequestContainer<GetEntitiesByAttributeRequest> request)
getEntitiesByAttributeAsync
in interface ILoop54Client
public AutoCompleteResponse autoComplete(AutoCompleteRequest request) throws Loop54Exception
autoComplete
in interface ILoop54Client
Loop54Exception
public AutoCompleteResponse autoComplete(RequestContainer<AutoCompleteRequest> request) throws Loop54Exception
autoComplete
in interface ILoop54Client
Loop54Exception
public java.util.concurrent.CompletableFuture<AutoCompleteResponse> autoCompleteAsync(AutoCompleteRequest request)
autoCompleteAsync
in interface ILoop54Client
public java.util.concurrent.CompletableFuture<AutoCompleteResponse> autoCompleteAsync(RequestContainer<AutoCompleteRequest> request)
autoCompleteAsync
in interface ILoop54Client
public GetRelatedEntitiesResponse getRelatedEntities(GetRelatedEntitiesRequest request) throws Loop54Exception
getRelatedEntities
in interface ILoop54Client
Loop54Exception
public GetRelatedEntitiesResponse getRelatedEntities(RequestContainer<GetRelatedEntitiesRequest> request) throws Loop54Exception
getRelatedEntities
in interface ILoop54Client
Loop54Exception
public java.util.concurrent.CompletableFuture<GetRelatedEntitiesResponse> getRelatedEntitiesAsync(GetRelatedEntitiesRequest request)
getRelatedEntitiesAsync
in interface ILoop54Client
public java.util.concurrent.CompletableFuture<GetRelatedEntitiesResponse> getRelatedEntitiesAsync(RequestContainer<GetRelatedEntitiesRequest> request)
getRelatedEntitiesAsync
in interface ILoop54Client
public GetComplementaryEntitiesResponse getComplementaryEntities(GetComplementaryEntitiesRequest request) throws Loop54Exception
getComplementaryEntities
in interface ILoop54Client
Loop54Exception
public GetComplementaryEntitiesResponse getComplementaryEntities(RequestContainer<GetComplementaryEntitiesRequest> request) throws Loop54Exception
getComplementaryEntities
in interface ILoop54Client
Loop54Exception
public java.util.concurrent.CompletableFuture<GetComplementaryEntitiesResponse> getComplementaryEntitiesAsync(GetComplementaryEntitiesRequest request)
getComplementaryEntitiesAsync
in interface ILoop54Client
public java.util.concurrent.CompletableFuture<GetComplementaryEntitiesResponse> getComplementaryEntitiesAsync(RequestContainer<GetComplementaryEntitiesRequest> request)
getComplementaryEntitiesAsync
in interface ILoop54Client
public GetBasketRecommendationsResponse getBasketRecommendations(GetBasketRecommendationsRequest request) throws Loop54Exception
getBasketRecommendations
in interface ILoop54Client
Loop54Exception
public GetBasketRecommendationsResponse getBasketRecommendations(RequestContainer<GetBasketRecommendationsRequest> request) throws Loop54Exception
getBasketRecommendations
in interface ILoop54Client
Loop54Exception
public java.util.concurrent.CompletableFuture<GetBasketRecommendationsResponse> getBasketRecommendationsAsync(GetBasketRecommendationsRequest request)
getBasketRecommendationsAsync
in interface ILoop54Client
public java.util.concurrent.CompletableFuture<GetBasketRecommendationsResponse> getBasketRecommendationsAsync(RequestContainer<GetBasketRecommendationsRequest> request)
getBasketRecommendationsAsync
in interface ILoop54Client
public GetRecommendedEntitiesResponse getRecommendedEntities(GetRecommendedEntitiesRequest request) throws Loop54Exception
getRecommendedEntities
in interface ILoop54Client
Loop54Exception
public GetRecommendedEntitiesResponse getRecommendedEntities(RequestContainer<GetRecommendedEntitiesRequest> request) throws Loop54Exception
getRecommendedEntities
in interface ILoop54Client
Loop54Exception
public java.util.concurrent.CompletableFuture<GetRecommendedEntitiesResponse> getRecommendedEntitiesAsync(GetRecommendedEntitiesRequest request)
getRecommendedEntitiesAsync
in interface ILoop54Client
public java.util.concurrent.CompletableFuture<GetRecommendedEntitiesResponse> getRecommendedEntitiesAsync(RequestContainer<GetRecommendedEntitiesRequest> request)
getRecommendedEntitiesAsync
in interface ILoop54Client
public GetPopularEntitiesResponse getPopularEntities(GetPopularEntitiesRequest request) throws Loop54Exception
getPopularEntities
in interface ILoop54Client
Loop54Exception
public GetPopularEntitiesResponse getPopularEntities(RequestContainer<GetPopularEntitiesRequest> request) throws Loop54Exception
getPopularEntities
in interface ILoop54Client
Loop54Exception
public java.util.concurrent.CompletableFuture<GetPopularEntitiesResponse> getPopularEntitiesAsync(GetPopularEntitiesRequest request)
getPopularEntitiesAsync
in interface ILoop54Client
public java.util.concurrent.CompletableFuture<GetPopularEntitiesResponse> getPopularEntitiesAsync(RequestContainer<GetPopularEntitiesRequest> request)
getPopularEntitiesAsync
in interface ILoop54Client
public GetRecentEntitiesResponse getRecentEntities(GetRecentEntitiesRequest request) throws Loop54Exception
getRecentEntities
in interface ILoop54Client
Loop54Exception
public GetRecentEntitiesResponse getRecentEntities(RequestContainer<GetRecentEntitiesRequest> request) throws Loop54Exception
getRecentEntities
in interface ILoop54Client
Loop54Exception
public java.util.concurrent.CompletableFuture<GetRecentEntitiesResponse> getRecentEntitiesAsync(GetRecentEntitiesRequest request)
getRecentEntitiesAsync
in interface ILoop54Client
public java.util.concurrent.CompletableFuture<GetRecentEntitiesResponse> getRecentEntitiesAsync(RequestContainer<GetRecentEntitiesRequest> request)
getRecentEntitiesAsync
in interface ILoop54Client
public Response sync() throws Loop54Exception
sync
in interface ILoop54Client
Loop54Exception
public Response sync(Request request) throws Loop54Exception
sync
in interface ILoop54Client
Loop54Exception
public Response sync(RequestContainer<Request> request) throws Loop54Exception
sync
in interface ILoop54Client
Loop54Exception
public java.util.concurrent.CompletableFuture<Response> syncAsync()
syncAsync
in interface ILoop54Client
public java.util.concurrent.CompletableFuture<Response> syncAsync(Request request)
syncAsync
in interface ILoop54Client
public java.util.concurrent.CompletableFuture<Response> syncAsync(RequestContainer<Request> request)
syncAsync
in interface ILoop54Client
public Response createEvents(CreateEventsRequest request) throws Loop54Exception
createEvents
in interface ILoop54Client
Loop54Exception
public Response createEvents(RequestContainer<CreateEventsRequest> request) throws Loop54Exception
createEvents
in interface ILoop54Client
Loop54Exception
public java.util.concurrent.CompletableFuture<Response> createEventsAsync(CreateEventsRequest request)
createEventsAsync
in interface ILoop54Client
public java.util.concurrent.CompletableFuture<Response> createEventsAsync(RequestContainer<CreateEventsRequest> request)
createEventsAsync
in interface ILoop54Client
public Response customCall(java.lang.String name, Request request) throws Loop54Exception
customCall
in interface ILoop54Client
Loop54Exception
public Response customCall(java.lang.String name, RequestContainer<Request> request) throws Loop54Exception
customCall
in interface ILoop54Client
Loop54Exception
public java.util.concurrent.CompletableFuture<Response> customCallAsync(java.lang.String name, Request request)
customCallAsync
in interface ILoop54Client
public java.util.concurrent.CompletableFuture<Response> customCallAsync(java.lang.String name, RequestContainer<Request> request)
customCallAsync
in interface ILoop54Client
public 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)