public static Photoset initializePhotoset(String id, String title, String description) { Photoset photoset = new Photoset(); photoset.setId(id); photoset.setTitle(title); photoset.setDescription(description); return photoset; }
/** * * @param childPhotosetElement * @return */ private Photoset createPhotoset(Element childPhotosetElement) { Photoset photoset = new Photoset(); photoset.setId(childPhotosetElement.getAttribute("id")); photoset.setTitle(childPhotosetElement.getAttribute("title")); photoset.setDescription(childPhotosetElement.getAttribute("description")); return photoset; }
/** * * @param childPhotosetElement * @return */ private Photoset createPhotoset(Element childPhotosetElement) { Photoset photoset = new Photoset(); photoset.setId(childPhotosetElement.getAttribute("id")); photoset.setTitle(childPhotosetElement.getAttribute("title")); photoset.setDescription(childPhotosetElement.getAttribute("description")); return photoset; }
/** * Create a new photoset. * * @param title * The photoset title * @param description * The photoset description * @param primaryPhotoId * The primary photo id * @return The new Photset * @throws FlickrException */ public Photoset create(String title, String description, String primaryPhotoId) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_CREATE); parameters.put("title", title); parameters.put("description", description); parameters.put("primary_photo_id", primaryPhotoId); Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element photosetElement = response.getPayload(); Photoset photoset = new Photoset(); photoset.setId(photosetElement.getAttribute("id")); photoset.setUrl(photosetElement.getAttribute("url")); return photoset; }
/** * Create a new photoset. * * @param title * The photoset title * @param description * The photoset description * @param primaryPhotoId * The primary photo id * @return The new Photset * @throws FlickrException */ public Photoset create(String title, String description, String primaryPhotoId) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_CREATE); parameters.put("title", title); parameters.put("description", description); parameters.put("primary_photo_id", primaryPhotoId); Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element photosetElement = response.getPayload(); Photoset photoset = new Photoset(); photoset.setId(photosetElement.getAttribute("id")); photoset.setUrl(photosetElement.getAttribute("url")); return photoset; }
photoset.setId(photosetElement.getAttribute("id"));
photoset.setId(photosetElement.getAttribute("id"));
Element photosetElement = (Element) photosetElements.item(i); Photoset photoset = new Photoset(); photoset.setId(photosetElement.getAttribute("id"));
Element photosetElement = (Element) photosetElements.item(i); Photoset photoset = new Photoset(); photoset.setId(photosetElement.getAttribute("id"));