com.aetrion.flickr
Class Flickr

java.lang.Object
  extended by com.aetrion.flickr.Flickr

public class Flickr
extends java.lang.Object

Main entry point for the Flickrj API. This class is used to acquire Interface classes which wrap the Flickr API.

If you registered API keys, you find them with the shared secret at your list of API keys

The user who authenticates himself, can manage this permissions at his list of Third-party applications (You -> Your account -> Extending Flickr -> Account Links -> edit).

Version:
$Id: Flickr.java,v 1.45 2009/06/23 21:51:25 x-mago Exp $
Author:
Anthony Eden

Field Summary
static int ACCURACY_CITY
           
static int ACCURACY_COUNTRY
           
static int ACCURACY_REGION
           
static int ACCURACY_STREET
          The highest accuracy for bounding-box searches.
static int ACCURACY_WORLD
          The lowest accuracy for bounding-box searches.
static java.lang.String CONTENTTYPE_OTHER
           
static java.lang.String CONTENTTYPE_PHOTO
           
static java.lang.String CONTENTTYPE_SCREENSHOT
           
static boolean debugRequest
          Set to true to enable request debugging (print the request stream, used for "post")
static boolean debugStream
          Set to true to enable response debugging (print the response stream)
static java.lang.String DEFAULT_HOST
          The default endpoint host.
static int PRIVACY_LEVEL_FAMILY
           
static int PRIVACY_LEVEL_FRIENDS
           
static int PRIVACY_LEVEL_FRIENDS_FAMILY
           
static int PRIVACY_LEVEL_NO_FILTER
           
static int PRIVACY_LEVEL_PRIVATE
           
static int PRIVACY_LEVEL_PUBLIC
           
static java.lang.String SAFETYLEVEL_MODERATE
           
static java.lang.String SAFETYLEVEL_RESTRICTED
           
static java.lang.String SAFETYLEVEL_SAFE
           
static boolean tracing
          If set to true, trace messages will be printed to STDOUT.
 
Constructor Summary
Flickr(java.lang.String apiKey)
          Construct a new Flickr gateway instance.
Flickr(java.lang.String apiKey, java.lang.String sharedSecret, Transport transport)
          Construct a new Flickr gateway instance.
Flickr(java.lang.String apiKey, Transport transport)
          Construct a new Flickr gateway instance.
 
Method Summary
 ActivityInterface getActivityInterface()
          Get the ActivityInterface.
 java.lang.String getApiKey()
          Get the API key.
 Auth getAuth()
          Get the Auth-object.
 AuthInterface getAuthInterface()
          Get the AuthInterface.
 BlogsInterface getBlogsInterface()
           
 CommentsInterface getCommentsInterface()
           
 CommonsInterface getCommonsInterface()
           
 ContactsInterface getContactsInterface()
           
 FavoritesInterface getFavoritesInterface()
           
 GeoInterface getGeoInterface()
           
 GroupsInterface getGroupsInterface()
           
 InterestingnessInterface getInterestingnessInterface()
           
 LicensesInterface getLicensesInterface()
           
 MachinetagsInterface getMachinetagsInterface()
           
 MembersInterface getMembersInterface()
           
 NotesInterface getNotesInterface()
           
 PandaInterface getPandaInterface()
           
 PeopleInterface getPeopleInterface()
           
 PhotosetsCommentsInterface getPhotosetsCommentsInterface()
           
 PhotosetsInterface getPhotosetsInterface()
           
 PhotosInterface getPhotosInterface()
           
 PlacesInterface getPlacesInterface()
           
 PoolsInterface getPoolsInterface()
           
 PrefsInterface getPrefsInterface()
           
 ReflectionInterface getReflectionInterface()
           
 java.lang.String getSharedSecret()
          Get the Shared-Secret.
 TagsInterface getTagsInterface()
          Get the TagsInterface for working with Flickr Tags.
 TestInterface getTestInterface()
           
 TransformInterface getTransformInterface()
           
 Transport getTransport()
          Get the Transport interface.
 Uploader getUploader()
           
 UploadInterface getUploadInterface()
           
 UrlsInterface getUrlsInterface()
           
 void setApiKey(java.lang.String apiKey)
          Set the API key to use which must not be null.
 void setAuth(Auth auth)
           
 void setSharedSecret(java.lang.String sharedSecret)
          Set the Shared-Secret to use which must not be null.
 void setTransport(Transport transport)
          Set the Transport which must not be null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_HOST

public static final java.lang.String DEFAULT_HOST
The default endpoint host.

See Also:
Constant Field Values

debugStream

public static boolean debugStream
Set to true to enable response debugging (print the response stream)


debugRequest

public static boolean debugRequest
Set to true to enable request debugging (print the request stream, used for "post")


tracing

public static boolean tracing
If set to true, trace messages will be printed to STDOUT.


CONTENTTYPE_PHOTO

public static final java.lang.String CONTENTTYPE_PHOTO
See Also:
PhotosInterface.setContentType(String, String), PrefsInterface.getContentType(), UploadMetaData.setContentType(String), Constant Field Values

CONTENTTYPE_SCREENSHOT

public static final java.lang.String CONTENTTYPE_SCREENSHOT
See Also:
PhotosInterface.setContentType(String, String), PrefsInterface.getContentType(), UploadMetaData.setContentType(String), Constant Field Values

CONTENTTYPE_OTHER

public static final java.lang.String CONTENTTYPE_OTHER
See Also:
PhotosInterface.setContentType(String, String), PrefsInterface.getContentType(), UploadMetaData.setContentType(String), Constant Field Values

ACCURACY_WORLD

public static final int ACCURACY_WORLD
The lowest accuracy for bounding-box searches.

See Also:
SearchParameters.setAccuracy(int), Constant Field Values

ACCURACY_COUNTRY

public static final int ACCURACY_COUNTRY
See Also:
SearchParameters.setAccuracy(int), Constant Field Values

ACCURACY_REGION

public static final int ACCURACY_REGION
See Also:
SearchParameters.setAccuracy(int), Constant Field Values

ACCURACY_CITY

public static final int ACCURACY_CITY
See Also:
SearchParameters.setAccuracy(int), Constant Field Values

ACCURACY_STREET

public static final int ACCURACY_STREET
The highest accuracy for bounding-box searches.

See Also:
SearchParameters.setAccuracy(int), Constant Field Values

SAFETYLEVEL_SAFE

public static final java.lang.String SAFETYLEVEL_SAFE
See Also:
PhotosInterface.setSafetyLevel(String, String, Boolean), PrefsInterface.getSafetyLevel(), UploadMetaData.setSafetyLevel(String), SearchParameters.setSafeSearch(String), Constant Field Values

SAFETYLEVEL_MODERATE

public static final java.lang.String SAFETYLEVEL_MODERATE
See Also:
PhotosInterface.setSafetyLevel(String, String, Boolean), PrefsInterface.getSafetyLevel(), UploadMetaData.setSafetyLevel(String), SearchParameters.setSafeSearch(String), Constant Field Values

SAFETYLEVEL_RESTRICTED

public static final java.lang.String SAFETYLEVEL_RESTRICTED
See Also:
PhotosInterface.setSafetyLevel(String, String, Boolean), PrefsInterface.getSafetyLevel(), UploadMetaData.setSafetyLevel(String), SearchParameters.setSafeSearch(String), Constant Field Values

PRIVACY_LEVEL_NO_FILTER

public static final int PRIVACY_LEVEL_NO_FILTER
See Also:
PhotosetsInterface.getPhotos(String, Set, int, int, int), PrefsInterface.getPrivacy(), PrefsInterface.getGeoPerms(), Constant Field Values

PRIVACY_LEVEL_PUBLIC

public static final int PRIVACY_LEVEL_PUBLIC
See Also:
PhotosetsInterface.getPhotos(String, Set, int, int, int), PrefsInterface.getPrivacy(), PrefsInterface.getGeoPerms(), Constant Field Values

PRIVACY_LEVEL_FRIENDS

public static final int PRIVACY_LEVEL_FRIENDS
See Also:
PhotosetsInterface.getPhotos(String, Set, int, int, int), PrefsInterface.getPrivacy(), PrefsInterface.getGeoPerms(), Constant Field Values

PRIVACY_LEVEL_FAMILY

public static final int PRIVACY_LEVEL_FAMILY
See Also:
PhotosetsInterface.getPhotos(String, Set, int, int, int), PrefsInterface.getPrivacy(), PrefsInterface.getGeoPerms(), Constant Field Values

PRIVACY_LEVEL_FRIENDS_FAMILY

public static final int PRIVACY_LEVEL_FRIENDS_FAMILY
See Also:
PhotosetsInterface.getPhotos(String, Set, int, int, int), PrefsInterface.getPrivacy(), PrefsInterface.getGeoPerms(), Constant Field Values

PRIVACY_LEVEL_PRIVATE

public static final int PRIVACY_LEVEL_PRIVATE
See Also:
PhotosetsInterface.getPhotos(String, Set, int, int, int), PrefsInterface.getPrivacy(), PrefsInterface.getGeoPerms(), Constant Field Values
Constructor Detail

Flickr

public Flickr(java.lang.String apiKey)
Construct a new Flickr gateway instance. Defaults to a REST transport.

Parameters:
apiKey - The API key, must be non-null

Flickr

public Flickr(java.lang.String apiKey,
              Transport transport)
Construct a new Flickr gateway instance.

Parameters:
apiKey - The API key, must be non-null
transport - The transport (REST or SOAP), must be non-null

Flickr

public Flickr(java.lang.String apiKey,
              java.lang.String sharedSecret,
              Transport transport)
Construct a new Flickr gateway instance.

Parameters:
apiKey - The API key, must be non-null
sharedSecret -
transport -
Method Detail

getApiKey

public java.lang.String getApiKey()
Get the API key.

Returns:
The API key

setApiKey

public void setApiKey(java.lang.String apiKey)
Set the API key to use which must not be null.

Parameters:
apiKey - The API key which cannot be null

setAuth

public void setAuth(Auth auth)

getAuth

public Auth getAuth()
Get the Auth-object.

Returns:
The Auth-object

getSharedSecret

public java.lang.String getSharedSecret()
Get the Shared-Secret.

Returns:
The Shared-Secret

setSharedSecret

public void setSharedSecret(java.lang.String sharedSecret)
Set the Shared-Secret to use which must not be null.

Parameters:
sharedSecret - The Shared-Secret which cannot be null

getTransport

public Transport getTransport()
Get the Transport interface.

Returns:
The Tranport interface

setTransport

public void setTransport(Transport transport)
Set the Transport which must not be null.

Parameters:
transport -

getAuthInterface

public AuthInterface getAuthInterface()
Get the AuthInterface.

Returns:
The AuthInterface

getActivityInterface

public ActivityInterface getActivityInterface()
Get the ActivityInterface.

Returns:
The ActivityInterface

getBlogsInterface

public BlogsInterface getBlogsInterface()

getCommentsInterface

public CommentsInterface getCommentsInterface()

getCommonsInterface

public CommonsInterface getCommonsInterface()

getContactsInterface

public ContactsInterface getContactsInterface()

getFavoritesInterface

public FavoritesInterface getFavoritesInterface()

getGeoInterface

public GeoInterface getGeoInterface()

getGroupsInterface

public GroupsInterface getGroupsInterface()

getInterestingnessInterface

public InterestingnessInterface getInterestingnessInterface()
Returns:
the interface to the flickr.interestingness methods

getLicensesInterface

public LicensesInterface getLicensesInterface()

getMachinetagsInterface

public MachinetagsInterface getMachinetagsInterface()

getMembersInterface

public MembersInterface getMembersInterface()

getNotesInterface

public NotesInterface getNotesInterface()

getPandaInterface

public PandaInterface getPandaInterface()

getPoolsInterface

public PoolsInterface getPoolsInterface()

getPeopleInterface

public PeopleInterface getPeopleInterface()

getPhotosInterface

public PhotosInterface getPhotosInterface()

getPhotosetsCommentsInterface

public PhotosetsCommentsInterface getPhotosetsCommentsInterface()

getPhotosetsInterface

public PhotosetsInterface getPhotosetsInterface()

getPlacesInterface

public PlacesInterface getPlacesInterface()

getPrefsInterface

public PrefsInterface getPrefsInterface()

getReflectionInterface

public ReflectionInterface getReflectionInterface()

getTagsInterface

public TagsInterface getTagsInterface()
Get the TagsInterface for working with Flickr Tags.

Returns:
The TagsInterface

getTestInterface

public TestInterface getTestInterface()

getTransformInterface

public TransformInterface getTransformInterface()

getUploadInterface

public UploadInterface getUploadInterface()

getUploader

public Uploader getUploader()

getUrlsInterface

public UrlsInterface getUrlsInterface()


Copyright (C) 2005-2008 Aetrion LLC. All Rights Reserved.