idx int64 0 165k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
146,900 | public boolean hasValue ( String fieldName ) { return resultMap . containsKey ( fieldName ) && resultMap . get ( fieldName ) != null ; } | Checks that a field exists and contains a non - null value . |
146,901 | 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 |
146,902 | @ 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 . |
146,903 | 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 . |
146,904 | 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 . |
146,905 | 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 |
146,906 | 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 . |
146,907 | 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 . |
146,908 | 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 . |
146,909 | 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 . |
146,910 | 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 . |
146,911 | 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 |
146,912 | 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 |
146,913 | public AuthInterface getAuthInterface ( ) { if ( authInterface == null ) { authInterface = new AuthInterface ( apiKey , sharedSecret , transport ) ; } return authInterface ; } | Get the AuthInterface . |
146,914 | public ActivityInterface getActivityInterface ( ) { if ( activityInterface == null ) { activityInterface = new ActivityInterface ( apiKey , sharedSecret , transport ) ; } return activityInterface ; } | Get the ActivityInterface . |
146,915 | public TagsInterface getTagsInterface ( ) { if ( tagsInterface == null ) { tagsInterface = new TagsInterface ( apiKey , sharedSecret , transport ) ; } return tagsInterface ; } | Get the TagsInterface for working with Flickr Tags . |
146,916 | public SuggestionsInterface getSuggestionsInterface ( ) { if ( suggestionsInterface == null ) { suggestionsInterface = new SuggestionsInterface ( apiKey , sharedSecret , transport ) ; } return suggestionsInterface ; } | Get the SuggestionsInterface . |
146,917 | public GroupDiscussInterface getDiscussionInterface ( ) { if ( discussionInterface == null ) { discussionInterface = new GroupDiscussInterface ( apiKey , sharedSecret , transport ) ; } return discussionInterface ; } | Get the GroupDiscussInterface . |
146,918 | 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 . |
146,919 | 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 . |
146,920 | public void postPhoto ( Photo photo , String blogId ) throws FlickrException { postPhoto ( photo , blogId , null ) ; } | Post the specified photo to a blog . |
146,921 | 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 . |
146,922 | 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 . |
146,923 | 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 . |
146,924 | 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 . |
146,925 | 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 . |
146,926 | @ 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 . |
146,927 | 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 . |
146,928 | 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 . |
146,929 | 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 . |
146,930 | 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 . |
146,931 | 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 . |
146,932 | 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 . |
146,933 | public String upload ( File file , UploadMetaData metaData ) throws FlickrException { Payload payload = new Payload ( file ) ; return sendUploadRequest ( metaData , payload ) ; } | Upload a photo from a File . |
146,934 | public String upload ( InputStream in , UploadMetaData metaData ) throws FlickrException { Payload payload = new Payload ( in ) ; return sendUploadRequest ( metaData , payload ) ; } | Upload a photo from an InputStream . |
146,935 | 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 . |
146,936 | private String getResponseString ( boolean async , UploaderResponse response ) { return async ? response . getTicketId ( ) : response . getPhotoId ( ) ; } | Get the photo or ticket id from the response . |
146,937 | 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 . |
146,938 | 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 . |
146,939 | 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 . |
146,940 | 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 . |
146,941 | 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 . |
146,942 | 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 . |
146,943 | 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 . |
146,944 | 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 . |
146,945 | 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 . |
146,946 | 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 . |
146,947 | 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 . |
146,948 | 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 . |
146,949 | 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 . |
146,950 | public void setLabel ( String label ) { int ix = lstSizes . indexOf ( label ) ; if ( ix != - 1 ) { setLabel ( ix ) ; } } | Set the String - representation of size . |
146,951 | 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 . |
146,952 | 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 . |
146,953 | 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 . |
146,954 | 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 . |
146,955 | 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 . |
146,956 | 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 . |
146,957 | 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 . |
146,958 | 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 . |
146,959 | 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 . |
146,960 | 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 . |
146,961 | 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 . |
146,962 | 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 . |
146,963 | 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 . |
146,964 | 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 . |
146,965 | 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 . |
146,966 | 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 . |
146,967 | 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 . |
146,968 | 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 . |
146,969 | 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 . |
146,970 | 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 . |
146,971 | 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 . |
146,972 | 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 . |
146,973 | 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 . |
146,974 | 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 . |
146,975 | 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 . |
146,976 | 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 . |
146,977 | 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 . |
146,978 | 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 . |
146,979 | 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 . |
146,980 | 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 . |
146,981 | 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 |
146,982 | 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 |
146,983 | 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 |
146,984 | 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 . |
146,985 | 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 . |
146,986 | 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 . |
146,987 | 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 |
146,988 | public static String join ( Collection < String > s , String delimiter ) { return join ( s , delimiter , false ) ; } | Join the Collection of Strings using the specified delimiter . |
146,989 | 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 . |
146,990 | public ReferrerList getCollectionReferrers ( Date date , String domain , String collectionId , int perPage , int page ) throws FlickrException { return getReferrers ( METHOD_GET_COLLECTION_REFERRERS , domain , "collection_id" , collectionId , date , perPage , page ) ; } | Get a list of referrers from a given domain to a collection . |
146,991 | public Stats getCollectionStats ( String collectionId , Date date ) throws FlickrException { return getStats ( METHOD_GET_COLLECTION_STATS , "collection_id" , collectionId , date ) ; } | Get the number of views comments and favorites on a collection for a given date . |
146,992 | public DomainList getPhotoDomains ( Date date , String photoId , int perPage , int page ) throws FlickrException { return getDomains ( METHOD_GET_PHOTO_DOMAINS , "photo_id" , photoId , date , perPage , page ) ; } | Get a list of referring domains for a photo . |
146,993 | public ReferrerList getPhotoReferrers ( Date date , String domain , String photoId , int perPage , int page ) throws FlickrException { return getReferrers ( METHOD_GET_PHOTO_REFERRERS , domain , "photo_id" , photoId , date , perPage , page ) ; } | Get a list of referrers from a given domain to a photo . |
146,994 | public Stats getPhotoStats ( String photoId , Date date ) throws FlickrException { return getStats ( METHOD_GET_PHOTO_STATS , "photo_id" , photoId , date ) ; } | Get the number of views comments and favorites on a photo for a given date . |
146,995 | public DomainList getPhotosetDomains ( Date date , String photosetId , int perPage , int page ) throws FlickrException { return getDomains ( METHOD_GET_PHOTOSET_DOMAINS , "photoset_id" , photosetId , date , perPage , page ) ; } | Get a list of referring domains for a photoset . |
146,996 | public ReferrerList getPhotosetReferrers ( Date date , String domain , String photosetId , int perPage , int page ) throws FlickrException { return getReferrers ( METHOD_GET_PHOTOSET_REFERRERS , domain , "photoset_id" , photosetId , date , perPage , page ) ; } | Get a list of referrers from a given domain to a photoset . |
146,997 | public Stats getPhotosetStats ( String photosetId , Date date ) throws FlickrException { return getStats ( METHOD_GET_PHOTOSET_STATS , "photoset_id" , photosetId , date ) ; } | Get the number of views comments and favorites on a photoset for a given date . |
146,998 | public DomainList getPhotostreamDomains ( Date date , int perPage , int page ) throws FlickrException { return getDomains ( METHOD_GET_PHOTOSTREAM_DOMAINS , null , null , date , perPage , page ) ; } | Get a list of referring domains for a photostream . |
146,999 | public ReferrerList getPhotostreamReferrers ( Date date , String domain , int perPage , int page ) throws FlickrException { return getReferrers ( METHOD_GET_PHOTOSTREAM_REFERRERS , domain , null , null , date , perPage , page ) ; } | Get a list of referrers from a given domain to a user s photostream . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.