public MembersList < Member > getList ( String groupId , Set < String > memberTypes , int perPage , int page ) throws FlickrException { MembersList < Member > members = new MembersList < Member > ( ) ; Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_LIST ) ; parameters . put ( "group_id" , groupId ) ; if ( perPage > 0 ) { parameters . put ( "per_page" , "" + perPage ) ; } if ( page > 0 ) { parameters . put ( "page" , "" + page ) ; } if ( memberTypes != null ) { parameters . put ( "membertypes" , StringUtilities . join ( memberTypes , "," ) ) ; } Response response = transportAPI . get ( transportAPI . getPath ( ) , parameters , apiKey , sharedSecret ) ; if ( response . isError ( ) ) { throw new FlickrException ( response . getErrorCode ( ) , response . getErrorMessage ( ) ) ; } Element mElement = response . getPayload ( ) ; members . setPage ( mElement . getAttribute ( "page" ) ) ; members . setPages ( mElement . getAttribute ( "pages" ) ) ; members . setPerPage ( mElement . getAttribute ( "perpage" ) ) ; members . setTotal ( mElement . getAttribute ( "total" ) ) ; NodeList mNodes = mElement . getElementsByTagName ( "member" ) ; for ( int i = 0 ; i < mNodes . getLength ( ) ; i ++ ) { Element element = ( Element ) mNodes . item ( i ) ; members . add ( parseMember ( element ) ) ; } return members ; }
Get a list of the members of a group . The call must be signed on behalf of a Flickr member and the ability to see the group membership will be determined by the Flickr member s group privileges .