com.amadeus.media.files.GeneratedPhotos Maven / Gradle / Ivy
package com.amadeus.media.files;
import com.amadeus.Amadeus;
import com.amadeus.Params;
import com.amadeus.Response;
import com.amadeus.exceptions.ResponseException;
import com.amadeus.resources.GeneratedPhoto;
import com.amadeus.resources.Resource;
/**
*
* A namespaced client for the
* /v2/media/files/generated-photos
endpoints.
*
*
*
* Access via the Amadeus client object.
*
*
*
* Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
* amadeus.media.files.generatedPhotos;
*/
public class GeneratedPhotos {
private Amadeus client;
/**
* Constructor.
* @hide
*/
public GeneratedPhotos(Amadeus client) {
this.client = client;
}
/**
*
* Returns a link to download a rendered image of a landscape.
*
*
*
* amadeus.media.files.generatedPhotos.get(Params
* .with("category", "BEACH"));
*
* @param params the parameters to send to the API
* @return an API response object
* @throws ResponseException when an exception occurs
*/
public GeneratedPhoto get(Params params) throws ResponseException {
Response response = client.get("/v2/media/files/generated-photos", params);
return (GeneratedPhoto) Resource.fromObject(response, GeneratedPhoto.class);
}
/**
* Convenience method for calling get
without any parameters.
* @see GeneratedPhotos#get()
*/
public GeneratedPhoto get() throws ResponseException {
return get(null);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy