Usages of

com.flickr4java.flickr.activity.ActivityInterface.userComments(?, ?)
@Test public void testUserComments() throws FlickrException { ActivityInterface actInterface = flickr.getActivityInterface(); ItemList<Item> list = actInterface.userComments(10, 1); assertTrue(list.size() > 0); }
public void showActivity( Flickr f ) throws FlickrException, IOException, SAXException { ActivityInterface iface = f.getActivityInterface(); ItemList<Item> list = iface.userComments( 10, 0 ); for ( int j = 0; j < list.size(); j++ ) { Item item = (Item) list.get( j ); logger.info( "Item " + ( j + 1 ) + "/" + list.size() + " type: " + item.getType() ); logger.info( "Item-id: " + item.getId() + "\n" ); Collection<Event> events = item.getEvents(); Iterator<Event> iterator = events.iterator(); int i = 0; int size = events.size(); while ( iterator.hasNext() ) { Event event = iterator.next(); logger.info( "Event " + ( i + 1 ) + "/" + size + " of Item " + ( j + 1 ) ); logger.info( "Event-type: " + event.getType() ); logger.info( "User: " + event.getUser() ); logger.info( "Username: " + event.getUsername() ); logger.info( "Value: " + event.getValue() + "\n" ); i++; } } ActivityInterface iface2 = f.getActivityInterface(); list = iface2.userPhotos( 50, 0, "300d" ); for ( int j = 0; j < list.size(); j++ ) { Item item = (Item) list.get( j ); logger.info( "Item " + ( j + 1 ) + "/" + list.size() + " type: " + item.getType() ); logger.info( "Item-id: " + item.getId() + "\n" ); Collection<Event> events = item.getEvents(); Iterator<Event> iterator = events.iterator(); int i = 0; int size = events.size(); while ( iterator.hasNext() ) { Event event = iterator.next(); logger.info( "Event " + ( i + 1 ) + "/" + size + " of Item " + ( j + 1 ) ); logger.info( "Event-type: " + event.getType() ); if ( event.getType().equals( "note" ) ) { logger.info( "Note-id: " + event.getId() ); } else if ( event.getType().equals( "comment" ) ) { logger.info( "Comment-id: " + event.getId() ); } logger.info( "User: " + event.getUser() ); logger.info( "Username: " + event.getUsername() ); logger.info( "Value: " + event.getValue() ); logger.info( "Dateadded: " + event.getDateadded() + "\n" ); i++; } } }
public void showActivity() throws FlickrException, IOException, SAXException { ActivityInterface iface = f.getActivityInterface(); ItemList list = iface.userComments(10, 0); for (int j = 0; j < list.size(); j++) { Item item = (Item) list.get(j); System.out.println("Item " + (j + 1) + "/" + list.size() + " type: " + item.getType()); System.out.println("Item-id: " + item.getId() + "\n"); ArrayList events = (ArrayList) item.getEvents(); for (int i = 0; i < events.size(); i++) { System.out.println("Event " + (i + 1) + "/" + events.size() + " of Item " + (j + 1)); System.out.println("Event-type: " + ((Event) events.get(i)).getType()); System.out.println("User: " + ((Event) events.get(i)).getUser()); System.out.println("Username: " + ((Event) events.get(i)).getUsername()); System.out.println("Value: " + ((Event) events.get(i)).getValue() + "\n"); } } ActivityInterface iface2 = f.getActivityInterface(); list = iface2.userPhotos(50, 0, "300d"); for (int j = 0; j < list.size(); j++) { Item item = (Item) list.get(j); System.out.println("Item " + (j + 1) + "/" + list.size() + " type: " + item.getType()); System.out.println("Item-id: " + item.getId() + "\n"); ArrayList events = (ArrayList) item.getEvents(); for (int i = 0; i < events.size(); i++) { System.out.println("Event " + (i + 1) + "/" + events.size() + " of Item " + (j + 1)); System.out.println("Event-type: " + ((Event) events.get(i)).getType()); if (((Event) events.get(i)).getType().equals("note")) { System.out.println("Note-id: " + ((Event) events.get(i)).getId()); } else if (((Event) events.get(i)).getType().equals("comment")) { System.out.println("Comment-id: " + ((Event) events.get(i)).getId()); } System.out.println("User: " + ((Event) events.get(i)).getUser()); System.out.println("Username: " + ((Event) events.get(i)).getUsername()); System.out.println("Value: " + ((Event) events.get(i)).getValue()); System.out.println("Dateadded: " + ((Event) events.get(i)).getDateadded() + "\n"); } } }
Usage snippet has been bookmarked! Review your bookmarks
Thank you! Review your likes