public class HTTPClient
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
Response |
delete(java.lang.String path)
A helper module for making generic DELETE requests calls.
|
Response |
delete(java.lang.String path,
Params params)
A helper module for making generic DELETE requests calls.
|
Resource[] |
first(Resource resource)
Fetches the first page for a given response.
|
Response |
first(Response response)
Fetches the first page for a given response.
|
Response |
get(java.lang.String path)
A helper module for making generic GET requests calls.
|
Response |
get(java.lang.String path,
Params params)
A helper module for making generic GET requests calls.
|
Configuration |
getConfiguration()
The configuration for this API client.
|
Resource[] |
last(Resource resource)
Fetches the last page for a given response.
|
Response |
last(Response response)
Fetches the last page for a given response.
|
Resource[] |
next(Resource resource)
Fetches the next page for a given response.
|
Response |
next(Response response)
Fetches the next page for a given response.
|
Response |
post(java.lang.String path)
A helper module for making generic POST requests calls.
|
Response |
post(java.lang.String path,
com.google.gson.JsonObject body)
A helper module for making generic POST requests calls.
|
Response |
post(java.lang.String path,
Params params)
A helper module for making generic POST requests calls.
|
Response |
post(java.lang.String path,
Params params,
com.google.gson.JsonObject body)
A helper module for making generic POST requests calls.
|
Response |
post(java.lang.String path,
Params params,
java.lang.String body)
A helper module for making generic POST requests calls.
|
Response |
post(java.lang.String path,
java.lang.String body)
A helper module for making generic POST requests calls.
|
Resource[] |
previous(Resource resource)
Fetches the previous page for a given response.
|
Response |
previous(Response response)
Fetches the previous page for a given response.
|
Response |
unauthenticatedRequest(java.lang.String verb,
java.lang.String path,
Params params,
java.lang.String body,
java.lang.String bearerToken)
A generic method for making any authenticated or unauthenticated request,
passing in the bearer token explicitly.
|
public Response get(java.lang.String path) throws ResponseException
ResponseExceptionget(String, Params)public Response get(java.lang.String path, Params params) throws ResponseException
A helper module for making generic GET requests calls. It is used by every namespaced API GET method.
amadeus.referenceData.urls.checkinLinks.get(Params.with("airline", "1X"));
It can be used to make any generic API call that is automatically authenticated using your API credentials:
amadeus.get("/v2/reference-data/urls/checkin-links", Params.with("airline", "1X"));
path - The full path for the API callparams - The optional GET params to pass to the APIResponseExceptionpublic Response delete(java.lang.String path, Params params) throws ResponseException
A helper module for making generic DELETE requests calls. It is used by every namespaced API DELETE method.
amadeus.booking.flightOrder("eJzTd9f3NjIJdzUGAAp%2fAiY=").delete();
It can be used to make any generic API call that is automatically authenticated using your API credentials:
amadeus.delete("/v1/foo/bar", Params.with("airline", "1X"));
path - The full path for the API callparams - The optional DELETE params to pass to the APIResponseExceptionpublic Response delete(java.lang.String path) throws ResponseException
ResponseExceptiondelete(String, Params)public Response post(java.lang.String path) throws ResponseException
ResponseExceptionpost(String, Params)public Response post(java.lang.String path, Params params) throws ResponseException
A helper module for making generic POST requests calls. It is used by every namespaced API POST method.
amadeus.foo.bar.post(Params.with("airline", "1X"));
It can be used to make any generic API call that is automatically authenticated using your API credentials:
amadeus.post("/v1/foo/bar", Params.with("airline", "1X"));
path - The full path for the API callparams - The optional POST params to pass to the APIResponseExceptionpublic Response post(java.lang.String path, java.lang.String body) throws ResponseException
A helper module for making generic POST requests calls. It is used by every namespaced API POST method.
amadeus.foo.bar.post(Params.with("airline", "1X"));
It can be used to make any generic API call that is automatically authenticated using your API credentials:
amadeus.post("/v1/foo/bar", Params.with("airline", "1X"));
path - The full path for the API callbody - The optional POST params to pass to the APIResponseExceptionpublic Response post(java.lang.String path, com.google.gson.JsonObject body) throws ResponseException
A helper module for making generic POST requests calls. It is used by every namespaced API POST method.
It can be used to make any generic API call that is automatically authenticated using your API credentials:
amadeus.post("/v1/foo/bar", { "foo" : "bar" })
path - The full path for the API callbody - The POST JsonObject body to pass to the APIResponseExceptionpublic Response post(java.lang.String path, Params params, com.google.gson.JsonObject body) throws ResponseException
A helper module for making generic POST requests calls. It is used by every namespaced API POST method.
It can be used to make any generic API call that is automatically authenticated using your API credentials:
amadeus.post("/v1/foo/bar", Params.with("airline", "1X"), { "foo" : "bar" })
path - The full path for the API callparams - The optional POST params to pass to the APIbody - The POST JsonObject body to pass to the APIResponseExceptionpublic Response post(java.lang.String path, Params params, java.lang.String body) throws ResponseException
A helper module for making generic POST requests calls. It is used by every namespaced API POST method.
It can be used to make any generic API call that is automatically authenticated using your API credentials:
amadeus.post("/v1/foo/bar", Params.with("airline", "1X"), { "foo" : "bar" })
path - The full path for the API callparams - The optional POST params to pass to the APIbody - The POST String object body to pass to the APIResponseExceptionpublic Response unauthenticatedRequest(java.lang.String verb, java.lang.String path, Params params, java.lang.String body, java.lang.String bearerToken) throws ResponseException
ResponseExceptionpublic Response previous(Response response) throws ResponseException
response - a response object previously received for which includes an array of dataResponseException - if the page could not be foundpublic Resource[] previous(Resource resource) throws ResponseException
resource - one of the responses previously received from an API callResponseException - if the page could not be foundpublic Response next(Response response) throws ResponseException
response - a response object previously received for which includes an array of dataResponseException - if the page could not be foundpublic Resource[] next(Resource resource) throws ResponseException
resource - one of the responses previously received from an API callResponseException - if the page could not be foundpublic Response first(Response response) throws ResponseException
response - a response object previously received for which includes an array of dataResponseException - if the page could not be foundpublic Resource[] first(Resource resource) throws ResponseException
resource - one of the responses previously received from an API callResponseException - if the page could not be foundpublic Response last(Response response) throws ResponseException
response - a response object previously received for which includes an array of dataResponseException - if the page could not be foundpublic Resource[] last(Resource resource) throws ResponseException
resource - one of the responses previously received from an API callResponseException - if the page could not be foundpublic Configuration getConfiguration()