io.sphere.sdk.client.SphereClient Maven / Gradle / Ivy
package io.sphere.sdk.client;
import io.sphere.sdk.http.HttpClient;
import java.util.concurrent.CompletionStage;
/**
* A client interface to perform requests to SPHERE.IO.
*
* Instantiation
*
* {@include.example example.JavaClientInstantiationExample}
*
* Example call
*
* {@include.example example.TaxCategoryQueryExample#exampleQuery()}
*
* Refer to resources for known SPHERE.IO requests.
*
*/
public interface SphereClient extends AutoCloseable {
CompletionStage execute(final SphereRequest sphereRequest);
@Override
void close();
/**
* Raw client creation.
* See also SphereClientFactory.
*
* @param config SPHERE.IO project and location
* @param httpClient client to execute requests
* @param tokenSupplier delivery of access tokens
* @return sphere client
*/
static SphereClient of(final SphereApiConfig config, final HttpClient httpClient, final SphereAccessTokenSupplier tokenSupplier) {
return SphereClientImpl.of(config, httpClient, tokenSupplier);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy