com.amadeus.travel.analytics.airTraffic.Searched Maven / Gradle / Ivy
package com.amadeus.travel.analytics.airTraffic;
import com.amadeus.Amadeus;
import com.amadeus.Params;
import com.amadeus.Response;
import com.amadeus.exceptions.ResponseException;
import com.amadeus.resources.Resource;
import com.amadeus.resources.Search;
/**
*
* A namespaced client for the
* /v1/travel/analytics/air-traffic/searched
endpoints.
*
*
*
* Access via the Amadeus client object.
*
*
*
* Amadeus amadeus = Amadeus.builder("API_KEY", "API_SECRET").build();
* amadeus.travel.analytics.airTraffis.Searched;
*/
public class Searched {
private Amadeus client;
/**
* Constructor.
*
* @hide
*/
public Searched(Amadeus client) {
this.client = client;
}
/**
*
* Returns a list of air traffic reports based on the number of searches.
*
*
*
* amadeus.travel.analytics.airTraffic.searched.get(Params
* .with("originCityCode", "MAD")
* .and("searchPeriod", "2017-08")
* .and("marketCountryCode", "ES"));
*
* @param params the parameters to send to the API
* @return an API response object
* @throws ResponseException when an exception occurs
*/
public Search[] get(Params params) throws ResponseException {
Response response = client.get("/v1/travel/analytics/air-traffic/searched", params);
return (Search[]) Resource.fromArray(response, Search[].class);
}
/**
* Convenience method for calling get
without any parameters.
*
* @see Searched#get()
*/
public Search[] get() throws ResponseException {
return get(null);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy