All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.softlayer.api.ApiClient Maven / Gradle / Ivy

There is a newer version: 0.3.4
Show newest version
package com.softlayer.api;

/** Common interface for all API clients. {@link RestApiClient} is the preferred implementation */
public interface ApiClient {
    
    /**
     * Set the username and API key credentials. This is required for most service methods.
     *
     * @return This instance
     */
    public ApiClient withCredentials(String username, String apiKey);
    
    /**
     * Get a service for the given sets of classes and optional ID. It is not recommended to call this
     * directly, but rather invoke the service method on the type class.
     * E.g. {@link com.softlayer.api.service.Account#service(ApiClient)}.
     */
    public  S createService(Class serviceClass, String id);
}