public Photoset create ( String title , String description , String primaryPhotoId ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_CREATE ) ; parameters . put ( "title" , title ) ; parameters . put ( "description" , description ) ; parameters . put ( "primary_photo_id" , primaryPhotoId ) ; Response response = transportAPI . post ( transportAPI . getPath ( ) , parameters , apiKey , sharedSecret ) ; if ( response . isError ( ) ) { throw new FlickrException ( response . getErrorCode ( ) , response . getErrorMessage ( ) ) ; } Element photosetElement = response . getPayload ( ) ; Photoset photoset = new Photoset ( ) ; photoset . setId ( photosetElement . getAttribute ( "id" ) ) ; photoset . setUrl ( photosetElement . getAttribute ( "url" ) ) ; return photoset ; }
Create a new photoset .