if (photoSetId == null) { RequestContext.getRequestContext().setExtras(EXTRAS); photoSetList = photosInterface.getNotInSet(PHOTO_PER_PAGE, page); RequestContext.getRequestContext().setExtras(ImmutableList.of()); } else {
/** * Get the photo for the specified ID. Currently maps to the getInfo() method. * * @param id * The ID * @return The Photo */ public Photo getPhoto(String id) throws FlickrException { return getPhoto(id, null); }
/** * Get the photo for the specified ID with the given secret. Currently maps to the getInfo() method. * * @param id * The ID * @param secret * The secret * @return The Photo */ public Photo getPhoto(String id, String secret) throws FlickrException { return getInfo(id, secret); }
@Override public PhotosInterface getPhotosInterface() { if (photosInterface == null) { photosInterface = new PhotosInterface(apiKey, sharedSecret, transport); } return photosInterface; }
/** * Get the available sizes of a Photo. * * The calling user must have permission to view the photo. * * This method uses no authentication. * * @param photoId * The photo ID * @return A collection of {@link Size} * @throws FlickrException */ public Collection<Size> getSizes(String photoId) throws FlickrException { return getSizes(photoId, false); }
/** * Request an image from the Flickr-servers. * <p> * * At {@link Size} you can find constants for the available sizes. * * @param photo * A photo-object * @param size * The size * @return An Image * @throws FlickrException */ public BufferedImage getImage(Photo photo, int size) throws FlickrException { try { return ImageIO.read(getImageAsStream(photo, size)); } catch (IOException e) { throw new FlickrException(e.getMessage(), e.getCause()); } }
/** * Get public photos from the user's contacts. * * This method does not require authentication. * * @see com.flickr4java.flickr.photos.Extras * @param userId * The user ID * @param count * The number of photos to return * @param justFriends * True to include friends * @param singlePhoto * True to get a single photo * @param includeSelf * True to include self * @return A collection of Photo objects * @throws FlickrException */ public PhotoList<Photo> getContactsPublicPhotos(String userId, int count, boolean justFriends, boolean singlePhoto, boolean includeSelf) throws FlickrException { return getContactsPublicPhotos(userId, Extras.MIN_EXTRAS, count, justFriends, singlePhoto, includeSelf); }
/** * Get the photo for the specified ID. Currently maps to the getInfo() method. * * @param id * The ID * @return The Photo */ public Photo getPhoto(String id) throws FlickrException { return getPhoto(id, null); }
/** * Get the photo for the specified ID with the given secret. Currently maps to the getInfo() method. * * @param id * The ID * @param secret * The secret * @return The Photo */ public Photo getPhoto(String id, String secret) throws FlickrException { return getInfo(id, secret); }
@Override public PhotosInterface getPhotosInterface() { if (photosInterface == null) { photosInterface = new PhotosInterface(apiKey, sharedSecret, transport); } return photosInterface; }
/** * Get the available sizes of a Photo. * * The calling user must have permission to view the photo. * * This method uses no authentication. * * @param photoId * The photo ID * @return A collection of {@link Size} * @throws FlickrException */ public Collection<Size> getSizes(String photoId) throws FlickrException { return getSizes(photoId, false); }
/** * Request an image from the Flickr-servers. * <p> * * At {@link Size} you can find constants for the available sizes. * * @param photo * A photo-object * @param size * The size * @return An Image * @throws FlickrException */ public BufferedImage getImage(Photo photo, int size) throws FlickrException { try { return ImageIO.read(getImageAsStream(photo, size)); } catch (IOException e) { throw new FlickrException(e.getMessage(), e.getCause()); } }
/** * Get public photos from the user's contacts. * * This method does not require authentication. * * @see com.flickr4java.flickr.photos.Extras * @param userId * The user ID * @param count * The number of photos to return * @param justFriends * True to include friends * @param singlePhoto * True to get a single photo * @param includeSelf * True to include self * @return A collection of Photo objects * @throws FlickrException */ public PhotoList<Photo> getContactsPublicPhotos(String userId, int count, boolean justFriends, boolean singlePhoto, boolean includeSelf) throws FlickrException { return getContactsPublicPhotos(userId, Extras.MIN_EXTRAS, count, justFriends, singlePhoto, includeSelf); }