Package com.bandwidth.iris.sdk
Class IrisClient
- java.lang.Object
-
- com.bandwidth.iris.sdk.IrisClient
-
public class IrisClient extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.http.impl.client.DefaultHttpClienthttpClientstatic StringUSER_AGENT
-
Constructor Summary
Constructors Constructor Description IrisClient(String accountId, String userName, String password)IrisClient(String uri, String accountId, String userName, String password, String version)IrisClient(org.apache.http.impl.client.DefaultHttpClient httpClient, String uri, String accountId, String username, String password)
-
Method Summary
-
-
-
Field Detail
-
USER_AGENT
public static final String USER_AGENT
-
httpClient
protected org.apache.http.impl.client.DefaultHttpClient httpClient
-
-
Method Detail
-
get
public IrisResponse get(String uri) throws Exception
- Throws:
Exception
-
post
public <T> T post(String uri, BaseModel data, Class<T> returnType) throws Exception
- Throws:
Exception
-
post
public IrisResponse post(String uri, BaseModel data) throws Exception
- Throws:
Exception
-
delete
public IrisResponse delete(String uri) throws Exception
- Throws:
Exception
-
put
public <T> T put(String uri, BaseModel data, Class<T> returnType) throws Exception
- Throws:
Exception
-
put
public IrisResponse put(String uri, BaseModel data) throws Exception
- Throws:
Exception
-
postFile
public void postFile(String uri, File file, String contentType) throws Exception
- Throws:
Exception
-
putFile
public void putFile(String uri, File file, String contentType) throws Exception
- Throws:
Exception
-
buildAccountModelUri
public String buildAccountModelUri(String uriSuffix, Map<String,Object> query) throws URISyntaxException
- Throws:
URISyntaxException
-
buildAccountModelUri
public String buildAccountModelUri(String[] tokens) throws URISyntaxException
- Throws:
URISyntaxException
-
buildAccountModelUri
public String buildAccountModelUri(String[] tokens, Map<String,Object> query) throws URISyntaxException
- Throws:
URISyntaxException
-
buildModelUri
public String buildModelUri(String[] tokens, Map<String,Object> query) throws URISyntaxException
- Throws:
URISyntaxException
-
buildModelUri
public String buildModelUri(String[] tokens) throws URISyntaxException
- Throws:
URISyntaxException
-
executeRequest
protected IrisResponse executeRequest(org.apache.http.client.methods.HttpUriRequest request) throws Exception
- Throws:
Exception
-
checkResponse
public void checkResponse(IrisResponse response, BaseResponse baseResponse) throws IrisClientException
- Throws:
IrisClientException
-
-