public PhotoList < Photo > getRecent ( Set < String > extras , int perPage , int page ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_RECENT ) ; if ( extras != null && ! extras . isEmpty ( ) ) { parameters . put ( Extras . KEY_EXTRAS , StringUtilities . join ( extras , "," ) ) ; } if ( perPage > 0 ) { parameters . put ( "per_page" , Integer . toString ( perPage ) ) ; } if ( page > 0 ) { parameters . put ( "page" , Integer . toString ( page ) ) ; } Response response = transport . get ( transport . getPath ( ) , parameters , apiKey , sharedSecret ) ; if ( response . isError ( ) ) { throw new FlickrException ( response . getErrorCode ( ) , response . getErrorMessage ( ) ) ; } Element photosElement = response . getPayload ( ) ; PhotoList < Photo > photos = PhotoUtils . createPhotoList ( photosElement ) ; return photos ; }
Get a collection of recent photos .