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

com.amadeus.referencedata.locations.PointOfInterest Maven / Gradle / Ivy

package com.amadeus.referencedata.locations;

import com.amadeus.Amadeus;
import com.amadeus.Params;
import com.amadeus.Response;
import com.amadeus.exceptions.ResponseException;
import com.amadeus.resources.Resource;

/**
 * 

* A namespaced client for the * /v1/reference-data/locations/pois endpoints. *

* *

* Access via the Amadeus client object. *

* *
 * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
 * amadeus.referenceData.locations.pointOfInterest;
*/ public class PointOfInterest { private Amadeus client; private String id; /** * Constructor. * @hide */ public PointOfInterest(Amadeus client, String id) { this.client = client; this.id = id; } /** *

* Returns a single Point of Interest from a given id. *

* *
   * amadeus.referenceData.locations.pointOfInterest("9CB40CB5D0").get();
* * @param params the parameters to send to the API * @return an API response object * @throws ResponseException when an exception occurs */ public com.amadeus.resources.PointOfInterest get(Params params) throws ResponseException { String path = String.format("/v1/reference-data/locations/pois/%s", id); Response response = client.get(path, params); return (com.amadeus.resources.PointOfInterest) Resource.fromObject( response, com.amadeus.resources.PointOfInterest.class); } /** * Convenience method for calling get without any parameters. * @see PointOfInterest#get() */ public com.amadeus.resources.PointOfInterest get() throws ResponseException { return get(null); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy