PhotoList<Photo> photosList = new PhotoList<>(); for (int i = 0; i < numPhotos; i++) { photosList.add(
@Override protected PhotoList<Photo> flickrProcess(String path) { try { final CollectionsInterface collectionsInterface = flickr.getCollectionsInterface(); final Matcher matcher = r.matcher(path); matcher.find(); final String userName = matcher.group(1); final String collectionsId = matcher.group(2); final List<Collection> collections = collectionsInterface.getTree(collectionsId, userName); final PhotoList<Photo> pl = new PhotoList<Photo>(); for (final Collection c : collections) pl.addAll(c.getPhotos()); return pl; } catch (final Exception e) { e.printStackTrace(); } return null; }
/** * Parse a list of Photos from given Element. * * @param photosElement * @return PhotoList */ public static final PhotoList<Photo> createPhotoList(Element photosElement) { PhotoList<Photo> photos = new PhotoList<Photo>(); photos.setPage(photosElement.getAttribute("page")); photos.setPages(photosElement.getAttribute("pages")); photos.setPerPage(photosElement.getAttribute("perpage")); photos.setTotal(photosElement.getAttribute("total")); NodeList photoNodes = photosElement.getElementsByTagName("photo"); for (int i = 0; i < photoNodes.getLength(); i++) { Element photoElement = (Element) photoNodes.item(i); photos.add(PhotoUtils.createPhoto(photoElement)); } return photos; }
/** * Parse a list of Photos from given Element. * * @param photosElement * @return PhotoList */ public static final PhotoList<Photo> createPhotoList(Element photosElement) { PhotoList<Photo> photos = new PhotoList<Photo>(); photos.setPage(photosElement.getAttribute("page")); photos.setPages(photosElement.getAttribute("pages")); photos.setPerPage(photosElement.getAttribute("perpage")); photos.setTotal(photosElement.getAttribute("total")); NodeList photoNodes = photosElement.getElementsByTagName("photo"); for (int i = 0; i < photoNodes.getLength(); i++) { Element photoElement = (Element) photoNodes.item(i); photos.add(PhotoUtils.createPhoto(photoElement)); } return photos; }
/** * * @param response */ private PhotoList<Photo> parsePopularPhotos(Response response) { Element payload = response.getPayload(); PhotoList<Photo> photos = new PhotoList<Photo>(); NodeList photoElements = payload.getElementsByTagName("photo"); for (int i = 0; i < photoElements.getLength(); i++) { Element photoElement = (Element) photoElements.item(i); Photo photo = PhotoUtils.createPhoto(photoElement); Element statsElement = XMLUtilities.getChild(photoElement, "stats"); Stats stats = parseStats(statsElement); photo.setStats(stats); photos.add(photo); } return photos; }
/** * * @param response */ private PhotoList<Photo> parsePopularPhotos(Response response) { Element payload = response.getPayload(); PhotoList<Photo> photos = new PhotoList<Photo>(); NodeList photoElements = payload.getElementsByTagName("photo"); for (int i = 0; i < photoElements.getLength(); i++) { Element photoElement = (Element) photoElements.item(i); Photo photo = PhotoUtils.createPhoto(photoElement); Element statsElement = XMLUtilities.getChild(photoElement, "stats"); Stats stats = parseStats(statsElement); photo.setStats(stats); photos.add(photo); } return photos; }
public PhotoList<Photo> getContactsPublicPhotos(String userId, Set<String> extras, int count, boolean justFriends, boolean singlePhoto, boolean includeSelf) throws FlickrException { PhotoList<Photo> photos = new PhotoList<Photo>();
PhotoList<Photo> photos = new PhotoList<Photo>(); parameters.put("method", METHOD_PHOTOS_FOR_LOCATION);
PhotoList<Photo> photos = new PhotoList<Photo>(); parameters.put("method", METHOD_PHOTOS_FOR_LOCATION);
PhotoList<Photo> photos = new PhotoList<Photo>();
PhotoList<Photo> photos = new PhotoList<Photo>();
PhotoList<Photo> photos = new PhotoList<Photo>();
PhotoList<Photo> photos = new PhotoList<Photo>();
PhotoList<Photo> photos = new PhotoList<Photo>();
PhotoList<Photo> photos = new PhotoList<Photo>();
PhotoList<Photo> photos = new PhotoList<Photo>();
PhotoList<Photo> photos = new PhotoList<Photo>();
PhotoList<Photo> photos = new PhotoList<Photo>(); photos.setPage(photosElement.getAttribute("page")); photos.setPerPage(photosElement.getAttribute("perpage"));
PhotoList<Photo> photos = new PhotoList<Photo>(); Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_CLUSTER_PHOTOS);
PhotoList<Photo> photos = new PhotoList<Photo>(); Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_CLUSTER_PHOTOS);