com.amadeus.location.analytics.CategoryRatedAreas Maven / Gradle / Ivy
package com.amadeus.location.analytics;
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.ScoredLocation;
/**
*
* A namespaced client for the
* /v1/location/analytics/category-rated-areas
endpoints.
*
*
*
* Access via the Amadeus client object.
*
*
*
* Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
* amadeus.location.analytics.categoryRatedAreas;
*/
public class CategoryRatedAreas {
private Amadeus client;
/**
* Constructor.
* @hide
*/
public CategoryRatedAreas(Amadeus client) {
this.client = client;
}
/**
*
* Provides a popularity scores
* for a given latitude and longitude.
*
*
*
* amadeus.location.analytics.categoryRatedAreas.get(Params
* .with("latitude", "41.397158")
* .and("longitude", "2.160873");
*
*
* @param params the parameters to send to the API
* @return an API response object
* @throws ResponseException when an exception occurs
*/
public ScoredLocation[] get(Params params) throws ResponseException {
Response response = client.get("/v1/location/analytics/category-rated-areas", params);
return (ScoredLocation[]) Resource.fromArray(response, ScoredLocation[].class);
}
/**
* Convenience method for calling get
without any parameters.
* @see CategoryRatedAreas#get()
*/
public ScoredLocation[] get() throws ResponseException {
return get(null);
}
}