idx
int64
0
41.2k
question
stringlengths
83
4.15k
target
stringlengths
5
715
23,200
@ SuppressWarnings ( "rawtypes" ) private MailInboundChannelAdapterSpec getImapFlowBuilder ( URLName urlName ) { return Mail . imapInboundAdapter ( urlName . toString ( ) ) . shouldMarkMessagesAsRead ( this . properties . isMarkAsRead ( ) ) ; }
Method to build Mail Channel Adapter for IMAP .
23,201
protected View postDeclineView ( ) { return new TopLevelWindowRedirect ( ) { protected String getRedirectUrl ( Map < String , ? > model ) { return postDeclineUrl ; } } ; }
View that redirects the top level window to the URL defined in postDeclineUrl property after user declines to authorize application . May be overridden for custom views particularly in the case where the post - decline view should be rendered in - canvas .
23,202
@ SuppressWarnings ( "unchecked" ) public Map < String , ? > decodeSignedRequest ( String signedRequest ) throws SignedRequestException { return decodeSignedRequest ( signedRequest , Map . class ) ; }
Decodes a signed request returning the payload of the signed request as a Map
23,203
public < T > T decodeSignedRequest ( String signedRequest , Class < T > type ) throws SignedRequestException { String [ ] split = signedRequest . split ( "\\." ) ; String encodedSignature = split [ 0 ] ; String payload = split [ 1 ] ; String decoded = base64DecodeToString ( payload ) ; byte [ ] signature = base64Decode...
Decodes a signed request returning the payload of the signed request as a specified type .
23,204
public String getString ( String fieldName ) { return hasValue ( fieldName ) ? String . valueOf ( resultMap . get ( fieldName ) ) : null ; }
Returns the value of the identified field as a String .
23,205
public Integer getInteger ( String fieldName ) { try { return hasValue ( fieldName ) ? Integer . valueOf ( String . valueOf ( resultMap . get ( fieldName ) ) ) : null ; } catch ( NumberFormatException e ) { throw new FqlException ( "Field '" + fieldName + "' is not a number." , e ) ; } }
Returns the value of the identified field as an Integer .
23,206
public Long getLong ( String fieldName ) { try { return hasValue ( fieldName ) ? Long . valueOf ( String . valueOf ( resultMap . get ( fieldName ) ) ) : null ; } catch ( NumberFormatException e ) { throw new FqlException ( "Field '" + fieldName + "' is not a number." , e ) ; } }
Returns the value of the identified field as a Long .
23,207
public Float getFloat ( String fieldName ) { try { return hasValue ( fieldName ) ? Float . valueOf ( String . valueOf ( resultMap . get ( fieldName ) ) ) : null ; } catch ( NumberFormatException e ) { throw new FqlException ( "Field '" + fieldName + "' is not a number." , e ) ; } }
Returns the value of the identified field as a Float .
23,208
public Boolean getBoolean ( String fieldName ) { return hasValue ( fieldName ) ? Boolean . valueOf ( String . valueOf ( resultMap . get ( fieldName ) ) ) : null ; }
Returns the value of the identified field as a Boolean .
23,209
public Date getTime ( String fieldName ) { try { if ( hasValue ( fieldName ) ) { return new Date ( Long . valueOf ( String . valueOf ( resultMap . get ( fieldName ) ) ) * 1000 ) ; } else { return null ; } } catch ( NumberFormatException e ) { throw new FqlException ( "Field '" + fieldName + "' is not a time." , e ) ; }...
Returns the value of the identified field as a Date . Time fields returned from an FQL query are expressed in terms of seconds since midnight January 1 1970 UTC .
23,210
public boolean hasValue ( String fieldName ) { return resultMap . containsKey ( fieldName ) && resultMap . get ( fieldName ) != null ; }
Checks that a field exists and contains a non - null value .
23,211
public < T > T fetchObject ( String objectId , Class < T > type ) { URI uri = URIBuilder . fromUri ( getBaseGraphApiUrl ( ) + objectId ) . build ( ) ; return getRestTemplate ( ) . getForObject ( uri , type ) ; }
low - level Graph API operations
23,212
@ RequestMapping ( value = "/{subscription}" , method = GET , params = "hub.mode=subscribe" ) public String verifySubscription ( @ PathVariable ( "subscription" ) String subscription , @ RequestParam ( "hub.challenge" ) String challenge , @ RequestParam ( "hub.verify_token" ) String verifyToken ) { logger . debug ( "Re...
Handles subscription verification callback from Facebook .
23,213
void handleFacebookError ( HttpStatus statusCode , FacebookError error ) { if ( error != null && error . getCode ( ) != null ) { int code = error . getCode ( ) ; if ( code == UNKNOWN ) { throw new UncategorizedApiException ( FACEBOOK_PROVIDER_ID , error . getMessage ( ) , null ) ; } else if ( code == SERVICE ) { throw ...
Examines the error data returned from Facebook and throws the most applicable exception .
23,214
private void showGlobalContextActionBar ( ) { ActionBar actionBar = getActionBar ( ) ; actionBar . setDisplayShowTitleEnabled ( true ) ; actionBar . setTitle ( R . string . app_name ) ; }
Per the navigation drawer design guidelines updates the action bar to show the global app context rather than just what s in the current screen .
23,215
public String getGroup ( String groupId ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_GROUP ) ; parameters . put ( "group_id" , groupId ) ; Response response = transport . get ( transport . getPath ( ) , parameters , apiKey...
Get the group URL for the specified group ID
23,216
public String getUserProfile ( String userId ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_USER_PROFILE ) ; parameters . put ( "user_id" , userId ) ; Response response = transport . get ( transport . getPath ( ) , parameter...
Get the URL for the user s profile .
23,217
public Group lookupGroup ( String url ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_LOOKUP_GROUP ) ; parameters . put ( "url" , url ) ; Response response = transport . get ( transport . getPath ( ) , parameters , apiKey , share...
Lookup the group for the specified URL .
23,218
public String lookupUser ( String url ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_LOOKUP_USER ) ; parameters . put ( "url" , url ) ; Response response = transport . get ( transport . getPath ( ) , parameters , apiKey , shared...
Lookup the username for the specified User URL .
23,219
public Gallery lookupGallery ( String galleryId ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_LOOKUP_GALLERY ) ; parameters . put ( "url" , galleryId ) ; Response response = transport . get ( transport . getPath ( ) , parameter...
Lookup the Gallery for the specified ID .
23,220
public void add ( String photoId ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_ADD ) ; parameters . put ( "photo_id" , photoId ) ; Response response = transportAPI . post ( transportAPI . getPath ( ) , parameters , apiKey , sha...
Add a photo to the user s favorites .
23,221
public PhotoContext getContext ( String photoId , String userId ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_CONTEXT ) ; parameters . put ( "photo_id" , photoId ) ; parameters . put ( "user_id" , userId ) ; Response respon...
Returns next and previous favorites for a photo in a user s favorites
23,222
public void editCoords ( String photoId , String userId , Rectangle bounds ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_EDIT_COORDS ) ; parameters . put ( "photo_id" , photoId ) ; parameters . put ( "user_id" , userId ) ; para...
Edit the co - ordinates that the user shows in
23,223
public AuthInterface getAuthInterface ( ) { if ( authInterface == null ) { authInterface = new AuthInterface ( apiKey , sharedSecret , transport ) ; } return authInterface ; }
Get the AuthInterface .
23,224
public ActivityInterface getActivityInterface ( ) { if ( activityInterface == null ) { activityInterface = new ActivityInterface ( apiKey , sharedSecret , transport ) ; } return activityInterface ; }
Get the ActivityInterface .
23,225
public TagsInterface getTagsInterface ( ) { if ( tagsInterface == null ) { tagsInterface = new TagsInterface ( apiKey , sharedSecret , transport ) ; } return tagsInterface ; }
Get the TagsInterface for working with Flickr Tags .
23,226
public SuggestionsInterface getSuggestionsInterface ( ) { if ( suggestionsInterface == null ) { suggestionsInterface = new SuggestionsInterface ( apiKey , sharedSecret , transport ) ; } return suggestionsInterface ; }
Get the SuggestionsInterface .
23,227
public GroupDiscussInterface getDiscussionInterface ( ) { if ( discussionInterface == null ) { discussionInterface = new GroupDiscussInterface ( apiKey , sharedSecret , transport ) ; } return discussionInterface ; }
Get the GroupDiscussInterface .
23,228
public Collection < Service > getServices ( ) throws FlickrException { List < Service > list = new ArrayList < Service > ( ) ; Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_SERVICES ) ; Response response = transportAPI . get ( transportAPI . getPath ...
Return a list of Flickr supported blogging services .
23,229
public void postPhoto ( Photo photo , String blogId , String blogPassword ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_POST_PHOTO ) ; parameters . put ( "blog_id" , blogId ) ; parameters . put ( "photo_id" , photo . getId ( ) ...
Post the specified photo to a blog . Note that the Photo . title and Photo . description are used for the blog entry title and body respectively .
23,230
public void postPhoto ( Photo photo , String blogId ) throws FlickrException { postPhoto ( photo , blogId , null ) ; }
Post the specified photo to a blog .
23,231
public Collection < Blog > getList ( ) throws FlickrException { List < Blog > blogs = new ArrayList < Blog > ( ) ; Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_LIST ) ; Response response = transportAPI . post ( transportAPI . getPath ( ) , parameter...
Get the collection of configured blogs for the calling user .
23,232
private static String getAttribute ( String name , Element firstElement , Element secondElement ) { String val = firstElement . getAttribute ( name ) ; if ( val . length ( ) == 0 && secondElement != null ) { val = secondElement . getAttribute ( name ) ; } return val ; }
Try to get an attribute value from two elements .
23,233
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 . getAttribut...
Parse a list of Photos from given Element .
23,234
public OAuth1RequestToken getRequestToken ( String callbackUrl ) { String callback = ( callbackUrl != null ) ? callbackUrl : OUT_OF_BOUND_AUTH_METHOD ; OAuth10aService service = new ServiceBuilder ( apiKey ) . apiSecret ( sharedSecret ) . callback ( callback ) . build ( FlickrApi . instance ( ) ) ; try { return service...
Get the OAuth request token - this is step one of authorization .
23,235
public String getAuthorizationUrl ( OAuth1RequestToken oAuthRequestToken , Permission permission ) { OAuth10aService service = new ServiceBuilder ( apiKey ) . apiSecret ( sharedSecret ) . build ( FlickrApi . instance ( ) ) ; String authorizationUrl = service . getAuthorizationUrl ( oAuthRequestToken ) ; return String ....
Get the auth URL this is step two of authorization .
23,236
@ SuppressWarnings ( "boxing" ) public OAuth1Token getAccessToken ( OAuth1RequestToken oAuthRequestToken , String verifier ) { OAuth10aService service = new ServiceBuilder ( apiKey ) . apiSecret ( sharedSecret ) . build ( FlickrApi . instance ( ) ) ; OAuth1Token accessToken = null ; boolean success = false ; for ( int ...
Trade the request token for an access token this is step three of authorization .
23,237
public OAuth1RequestToken exchangeAuthToken ( String authToken ) throws FlickrException { Map < String , String > parameters = new TreeMap < String , String > ( ) ; parameters . put ( "method" , METHOD_EXCHANGE_TOKEN ) ; parameters . put ( Flickr . API_KEY , apiKey ) ; parameters . put ( "api_sig" , getSignature ( shar...
Exchange an auth token from the old Authentication API to an OAuth access token .
23,238
private OAuth1RequestToken constructToken ( Response response ) { Element authElement = response . getPayload ( ) ; String oauthToken = XMLUtilities . getChildValue ( authElement , "oauth_token" ) ; String oauthTokenSecret = XMLUtilities . getChildValue ( authElement , "oauth_token_secret" ) ; OAuth1RequestToken token ...
Construct a Access Token from a Flickr Response .
23,239
private String getSignature ( String sharedSecret , Map < String , String > params ) { StringBuffer buffer = new StringBuffer ( ) ; buffer . append ( sharedSecret ) ; for ( Map . Entry < String , String > entry : params . entrySet ( ) ) { buffer . append ( entry . getKey ( ) ) ; buffer . append ( entry . getValue ( ) )...
Get a signature for a list of parameters using the given shared secret .
23,240
public static URL buildUrl ( String host , int port , String path , Map < String , String > parameters ) throws MalformedURLException { return buildUrl ( "http" , port , path , parameters ) ; }
Build a request URL .
23,241
public static URL buildUrl ( String scheme , String host , int port , String path , Map < String , String > parameters ) throws MalformedURLException { checkSchemeAndPort ( scheme , port ) ; StringBuilder buffer = new StringBuilder ( ) ; if ( ! host . startsWith ( scheme + "://" ) ) { buffer . append ( scheme ) . appen...
Build a request URL using a given scheme .
23,242
public String upload ( byte [ ] data , UploadMetaData metaData ) throws FlickrException { Payload payload = new Payload ( data ) ; return sendUploadRequest ( metaData , payload ) ; }
Upload a photo from a byte - array .
23,243
public String upload ( File file , UploadMetaData metaData ) throws FlickrException { Payload payload = new Payload ( file ) ; return sendUploadRequest ( metaData , payload ) ; }
Upload a photo from a File .
23,244
public String upload ( InputStream in , UploadMetaData metaData ) throws FlickrException { Payload payload = new Payload ( in ) ; return sendUploadRequest ( metaData , payload ) ; }
Upload a photo from an InputStream .
23,245
public String replace ( File file , String flickrId , boolean async ) throws FlickrException { Payload payload = new Payload ( file , flickrId ) ; return sendReplaceRequest ( async , payload ) ; }
Replace a photo from a File .
23,246
private String getResponseString ( boolean async , UploaderResponse response ) { return async ? response . getTicketId ( ) : response . getPhotoId ( ) ; }
Get the photo or ticket id from the response .
23,247
public void setViews ( String views ) { if ( views != null ) { try { setViews ( Integer . parseInt ( views ) ) ; } catch ( NumberFormatException e ) { setViews ( - 1 ) ; } } }
Sets the number of views for this Photo . For un - authenticated calls this value is not available and will be set to - 1 .
23,248
public void setRotation ( String rotation ) { if ( rotation != null ) { try { setRotation ( Integer . parseInt ( rotation ) ) ; } catch ( NumberFormatException e ) { setRotation ( - 1 ) ; } } }
Set the degrees of rotation . Value will be set to - 1 if not available .
23,249
public InputStream getOriginalAsStream ( ) throws IOException , FlickrException { if ( originalFormat != null ) { return getOriginalImageAsStream ( "_o." + originalFormat ) ; } return getOriginalImageAsStream ( DEFAULT_ORIGINAL_IMAGE_SUFFIX ) ; }
Get an InputStream for the original image . Callers must close the stream upon completion .
23,250
public String getOriginalUrl ( ) throws FlickrException { if ( originalSize == null ) { if ( originalFormat != null ) { return getOriginalBaseImageUrl ( ) + "_o." + originalFormat ; } return getOriginalBaseImageUrl ( ) + DEFAULT_ORIGINAL_IMAGE_SUFFIX ; } else { return originalSize . getSource ( ) ; } }
Get the original image URL .
23,251
private BufferedImage getImage ( String suffix ) throws IOException { StringBuffer buffer = getBaseImageUrl ( ) ; buffer . append ( suffix ) ; return _getImage ( buffer . toString ( ) ) ; }
Get an image using the specified URL suffix .
23,252
private BufferedImage getOriginalImage ( String suffix ) throws IOException , FlickrException { StringBuffer buffer = getOriginalBaseImageUrl ( ) ; buffer . append ( suffix ) ; return _getImage ( buffer . toString ( ) ) ; }
Get the original - image using the specified URL suffix .
23,253
private InputStream getImageAsStream ( String suffix ) throws IOException { StringBuffer buffer = getBaseImageUrl ( ) ; buffer . append ( suffix ) ; return _getImageAsStream ( buffer . toString ( ) ) ; }
Get an image as a stream . Callers must be sure to close the stream when they are done with it .
23,254
public void setSizes ( Collection < Size > sizes ) { for ( Size size : sizes ) { if ( size . getLabel ( ) == Size . SMALL ) { smallSize = size ; } else if ( size . getLabel ( ) == Size . SQUARE ) { squareSize = size ; } else if ( size . getLabel ( ) == Size . THUMB ) { thumbnailSize = size ; } else if ( size . getLabel...
Set sizes to override the generated URLs of the different sizes .
23,255
public void rotate ( String photoId , int degrees ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_ROTATE ) ; parameters . put ( "photo_id" , photoId ) ; parameters . put ( "degrees" , String . valueOf ( degrees ) ) ; Response res...
Rotate the specified photo . The only allowed values for degrees are 90 180 and 270 .
23,256
public Map < String , String > getUploadParameters ( ) { Map < String , String > parameters = new TreeMap < > ( ) ; String title = getTitle ( ) ; if ( title != null ) { parameters . put ( "title" , title ) ; } String description = getDescription ( ) ; if ( description != null ) { parameters . put ( "description" , desc...
Get the upload parameters .
23,257
public void deleteComment ( String commentId ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_DELETE_COMMENT ) ; parameters . put ( "comment_id" , commentId ) ; Response response = transportAPI . post ( transportAPI . getPath ( ) ...
Delete a comment as the currently authenticated user .
23,258
public void editComment ( String commentId , String commentText ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_EDIT_COMMENT ) ; parameters . put ( "comment_id" , commentId ) ; parameters . put ( "comment_text" , commentText ) ; ...
Edit the text of a comment as the currently authenticated user .
23,259
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_LI...
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 .
23,260
public void setLabel ( String label ) { int ix = lstSizes . indexOf ( label ) ; if ( ix != - 1 ) { setLabel ( ix ) ; } }
Set the String - representation of size .
23,261
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 )...
Create a new photoset .
23,262
public void editMeta ( String photosetId , String title , String description ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_EDIT_META ) ; parameters . put ( "photoset_id" , photosetId ) ; parameters . put ( "title" , title ) ; i...
Modify the meta - data for a photoset .
23,263
public void editPhotos ( String photosetId , String primaryPhotoId , String [ ] photoIds ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_EDIT_PHOTOS ) ; parameters . put ( "photoset_id" , photosetId ) ; parameters . put ( "primar...
Edit which photos are in the photoset .
23,264
public Photoset getInfo ( String photosetId ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_INFO ) ; parameters . put ( "photoset_id" , photosetId ) ; Response response = transportAPI . get ( transportAPI . getPath ( ) , para...
Get the information for a specified photoset .
23,265
public PhotoList < Photo > getPhotos ( String photosetId , Set < String > extras , int privacy_filter , int perPage , int page ) throws FlickrException { PhotoList < Photo > photos = new PhotoList < Photo > ( ) ; Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , ME...
Get a collection of Photo objects for the specified Photoset .
23,266
public void orderSets ( String [ ] photosetIds ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_ORDER_SETS ) ; ; parameters . put ( "photoset_ids" , StringUtilities . join ( photosetIds , "," ) ) ; Response response = transportAPI...
Set the order in which sets are returned for the user .
23,267
public Collection < Contact > getList ( ) throws FlickrException { ContactList < Contact > contacts = new ContactList < Contact > ( ) ; Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_LIST ) ; Response response = transportAPI . get ( transportAPI . get...
Get the collection of contacts for the calling user .
23,268
public Collection < Contact > getListRecentlyUploaded ( Date lastUpload , String filter ) throws FlickrException { List < Contact > contacts = new ArrayList < Contact > ( ) ; Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_LIST_RECENTLY_UPLOADED ) ; if...
Return a list of contacts for a user who have recently uploaded photos along with the total count of photos uploaded .
23,269
public Collection < Contact > getPublicList ( String userId ) throws FlickrException { List < Contact > contacts = new ArrayList < Contact > ( ) ; Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_PUBLIC_LIST ) ; parameters . put ( "user_id" , userId ) ;...
Get the collection of public contacts for the specified user ID .
23,270
public Collection < String > getMethods ( ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_METHODS ) ; Response response = transport . get ( transport . getPath ( ) , parameters , apiKey , sharedSecret ) ; if ( response . isEr...
Get a list of all methods .
23,271
public PhotoContext getContext ( String photoId , String groupId ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_CONTEXT ) ; parameters . put ( "photo_id" , photoId ) ; parameters . put ( "group_id" , groupId ) ; Response res...
Get the context for a photo in the group pool .
23,272
public Collection < Group > getGroups ( ) throws FlickrException { GroupList < Group > groups = new GroupList < Group > ( ) ; Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_GROUPS ) ; Response response = transport . get ( transport . getPath ( ) , par...
Get a collection of all of the user s groups .
23,273
public PhotoList < Photo > getPhotos ( String groupId , String userId , String [ ] tags , Set < String > extras , int perPage , int page ) throws FlickrException { PhotoList < Photo > photos = new PhotoList < Photo > ( ) ; Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "me...
Get the photos for the specified group pool optionally filtering by taf .
23,274
public int getGeoPerms ( ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_GEO_PERMS ) ; Response response = transportAPI . get ( transportAPI . getPath ( ) , parameters , apiKey , sharedSecret ) ; if ( response . isError ( ) )...
Returns the default privacy level for geographic information attached to the user s photos .
23,275
public boolean getHidden ( ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_HIDDEN ) ; Response response = transportAPI . get ( transportAPI . getPath ( ) , parameters , apiKey , sharedSecret ) ; if ( response . isError ( ) ) ...
Returns the default hidden preference for the user .
23,276
public String getSafetyLevel ( ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_SAFETY_LEVEL ) ; Response response = transportAPI . get ( transportAPI . getPath ( ) , parameters , apiKey , sharedSecret ) ; if ( response . isEr...
Returns the default safety level preference for the user .
23,277
public int getPrivacy ( ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_PRIVACY ) ; Response response = transportAPI . get ( transportAPI . getPath ( ) , parameters , apiKey , sharedSecret ) ; if ( response . isError ( ) ) { ...
Returns the default privacy level preference for the user .
23,278
public Category browse ( String catId ) throws FlickrException { List < Subcategory > subcategories = new ArrayList < Subcategory > ( ) ; List < Group > groups = new ArrayList < Group > ( ) ; Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_BROWSE ) ; if ( ...
Browse groups for the given category ID . If a null value is passed for the category then the root category is used .
23,279
public Collection < Group > search ( String text , int perPage , int page ) throws FlickrException { GroupList < Group > groupList = new GroupList < Group > ( ) ; Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_SEARCH ) ; parameters . put ( "text" , text )...
Search for groups . 18 + groups will only be returned for authenticated calls where the authenticated user is over 18 . This method does not require authentication .
23,280
public void join ( String groupId , Boolean acceptRules ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_JOIN ) ; parameters . put ( "group_id" , groupId ) ; if ( acceptRules != null ) { parameters . put ( "accept_rules" , acceptR...
Join a group as a public member .
23,281
public void joinRequest ( String groupId , String message , boolean acceptRules ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_JOIN_REQUEST ) ; parameters . put ( "group_id" , groupId ) ; parameters . put ( "message" , message )...
Request to join a group .
23,282
public void leave ( String groupId , Boolean deletePhotos ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_LEAVE ) ; parameters . put ( "group_id" , groupId ) ; parameters . put ( "delete_photos" , deletePhotos ) ; Response respon...
Leave a group .
23,283
private void setNsid ( ) throws FlickrException { if ( username != null && ! username . equals ( "" ) ) { Auth auth = null ; if ( authStore != null ) { auth = authStore . retrieve ( username ) ; if ( auth != null ) { nsid = auth . getUser ( ) . getId ( ) ; } } if ( auth != null ) return ; Auth [ ] allAuths = authStore ...
Check local saved copy first ?? . If Auth by username is available then we will not need to make the API call .
23,284
private Auth constructAuth ( String authToken , String tokenSecret , String username ) throws IOException { Auth auth = new Auth ( ) ; auth . setToken ( authToken ) ; auth . setTokenSecret ( tokenSecret ) ; auth . setPermission ( Permission . fromString ( "delete" ) ) ; User user = new User ( ) ; user . setId ( nsid ) ...
If the Authtoken was already created in a separate program but not saved to file .
23,285
public PlacesList < Place > find ( String query ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; PlacesList < Place > placesList = new PlacesList < Place > ( ) ; parameters . put ( "method" , METHOD_FIND ) ; parameters . put ( "query" , query ) ; Response response = ...
Return a list of place IDs for a query string .
23,286
public Location getInfo ( String placeId , String woeId ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_INFO ) ; if ( placeId != null ) { parameters . put ( "place_id" , placeId ) ; } if ( woeId != null ) { parameters . put (...
Get informations about a place .
23,287
public PlacesList < Place > placesForUser ( int placeType , String woeId , String placeId , String threshold , Date minUploadDate , Date maxUploadDate , Date minTakenDate , Date maxTakenDate ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; PlacesList < Place > places...
Return a list of the top 100 unique places clustered by a given placetype for a user .
23,288
public Location resolvePlaceId ( String placeId ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_RESOLVE_PLACE_ID ) ; parameters . put ( "place_id" , placeId ) ; Response response = transportAPI . get ( transportAPI . getPath ( ) ...
Find Flickr Places information by Place ID .
23,289
public Location resolvePlaceURL ( String flickrPlacesUrl ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_RESOLVE_PLACE_URL ) ; parameters . put ( "url" , flickrPlacesUrl ) ; Response response = transportAPI . get ( transportAPI ....
Find Flickr Places information by Place URL .
23,290
public TopicList < Topic > getTopicsList ( String groupId , int perPage , int page ) throws FlickrException { TopicList < Topic > topicList = new TopicList < Topic > ( ) ; Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_TOPICS_GET_LIST ) ; parameters . put...
Get a list of topics from a group .
23,291
public Topic getTopicInfo ( String topicId ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_TOPICS_GET_INFO ) ; parameters . put ( "topic_id" , topicId ) ; Response response = transportAPI . get ( transportAPI . getPath ( ) , para...
Get info for a given topic
23,292
public ReplyObject getReplyList ( String topicId , int perPage , int page ) throws FlickrException { ReplyList < Reply > reply = new ReplyList < Reply > ( ) ; TopicList < Topic > topic = new TopicList < Topic > ( ) ; Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" ...
Get list of replies
23,293
public Reply getReplyInfo ( String topicId , String replyId ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_REPLIES_GET_INFO ) ; parameters . put ( "topic_id" , topicId ) ; parameters . put ( "reply_id" , replyId ) ; Response res...
Get info for a given topic reply
23,294
public NamespacesList < Namespace > getNamespaces ( String predicate , int perPage , int page ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; NamespacesList < Namespace > nsList = new NamespacesList < Namespace > ( ) ; parameters . put ( "method" , METHOD_GET_NAMESP...
Return a list of unique namespaces optionally limited by a given predicate in alphabetical order .
23,295
public NamespacesList < Pair > getPairs ( String namespace , String predicate , int perPage , int page ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; NamespacesList < Pair > nsList = new NamespacesList < Pair > ( ) ; parameters . put ( "method" , METHOD_GET_PAIRS )...
Return a list of unique namespace and predicate pairs optionally limited by predicate or namespace in alphabetical order .
23,296
public NamespacesList < Value > getValues ( String namespace , String predicate , int perPage , int page ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; NamespacesList < Value > valuesList = new NamespacesList < Value > ( ) ; parameters . put ( "method" , METHOD_GET...
Return a list of unique values for a namespace and predicate .
23,297
public static String join ( Collection < String > s , String delimiter , boolean doQuote ) { StringBuffer buffer = new StringBuffer ( ) ; Iterator < String > iter = s . iterator ( ) ; while ( iter . hasNext ( ) ) { if ( doQuote ) { buffer . append ( "\"" + iter . next ( ) + "\"" ) ; } else { buffer . append ( iter . ne...
Join the Collection of Strings using the specified delimter and optionally quoting each
23,298
public static String join ( Collection < String > s , String delimiter ) { return join ( s , delimiter , false ) ; }
Join the Collection of Strings using the specified delimiter .
23,299
public DomainList getCollectionDomains ( Date date , String collectionId , int perPage , int page ) throws FlickrException { return getDomains ( METHOD_GET_COLLECTION_DOMAINS , "collection_id" , collectionId , date , perPage , page ) ; }
Get a list of referring domains for a collection .