com.aetrion.flickr.tags
Class TagsInterface

java.lang.Object
  extended by com.aetrion.flickr.tags.TagsInterface

public class TagsInterface
extends java.lang.Object

Interface for working with Flickr tags.

Version:
$Id: TagsInterface.java,v 1.19 2009/07/02 21:52:35 x-mago Exp $
Author:
Anthony Eden

Field Summary
static java.lang.String METHOD_GET_CLUSTER_PHOTOS
           
static java.lang.String METHOD_GET_CLUSTERS
           
static java.lang.String METHOD_GET_HOT_LIST
           
static java.lang.String METHOD_GET_LIST_PHOTO
           
static java.lang.String METHOD_GET_LIST_USER
           
static java.lang.String METHOD_GET_LIST_USER_POPULAR
           
static java.lang.String METHOD_GET_LIST_USER_RAW
           
static java.lang.String METHOD_GET_RELATED
           
static java.lang.String PERIOD_DAY
           
static java.lang.String PERIOD_WEEK
           
 
Constructor Summary
TagsInterface(java.lang.String apiKey, java.lang.String sharedSecret, Transport transportAPI)
          Construct a TagsInterface.
 
Method Summary
 PhotoList getClusterPhotos(java.lang.String tag, java.lang.String clusterId)
          Returns the first 24 photos for a given tag cluster.
 ClusterList getClusters(java.lang.String searchTag)
          Search for tag-clusters.
 java.util.Collection getHotList(java.lang.String period, int count)
          Returns a list of hot tags for the given period.
 Photo getListPhoto(java.lang.String photoId)
          Get a list of tags for the specified photo.
 java.util.Collection getListUser(java.lang.String userId)
          Get a collection of tags used by the specified user.
 java.util.Collection getListUserPopular(java.lang.String userId)
          Get a list of the user's popular tags.
 java.util.Collection getListUserRaw(java.lang.String tagVal)
          Get a list of the user's (identified by token) popular tags.
 RelatedTagsList getRelated(java.lang.String tag)
          Get the related tags.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

METHOD_GET_CLUSTERS

public static final java.lang.String METHOD_GET_CLUSTERS
See Also:
Constant Field Values

METHOD_GET_HOT_LIST

public static final java.lang.String METHOD_GET_HOT_LIST
See Also:
Constant Field Values

METHOD_GET_LIST_PHOTO

public static final java.lang.String METHOD_GET_LIST_PHOTO
See Also:
Constant Field Values

METHOD_GET_LIST_USER

public static final java.lang.String METHOD_GET_LIST_USER
See Also:
Constant Field Values

METHOD_GET_LIST_USER_POPULAR

public static final java.lang.String METHOD_GET_LIST_USER_POPULAR
See Also:
Constant Field Values

METHOD_GET_LIST_USER_RAW

public static final java.lang.String METHOD_GET_LIST_USER_RAW
See Also:
Constant Field Values

METHOD_GET_RELATED

public static final java.lang.String METHOD_GET_RELATED
See Also:
Constant Field Values

METHOD_GET_CLUSTER_PHOTOS

public static final java.lang.String METHOD_GET_CLUSTER_PHOTOS
See Also:
Constant Field Values

PERIOD_WEEK

public static final java.lang.String PERIOD_WEEK
See Also:
Constant Field Values

PERIOD_DAY

public static final java.lang.String PERIOD_DAY
See Also:
Constant Field Values
Constructor Detail

TagsInterface

public TagsInterface(java.lang.String apiKey,
                     java.lang.String sharedSecret,
                     Transport transportAPI)
Construct a TagsInterface.

Parameters:
apiKey - The API key
transportAPI - The Transport interface
Method Detail

getClusters

public ClusterList getClusters(java.lang.String searchTag)
                        throws java.io.IOException,
                               org.xml.sax.SAXException,
                               FlickrException
Search for tag-clusters.

This method does not require authentication.

Parameters:
searchTag -
Returns:
a list of clusters
Throws:
java.io.IOException
org.xml.sax.SAXException
FlickrException
Since:
1.2

getClusterPhotos

public PhotoList getClusterPhotos(java.lang.String tag,
                                  java.lang.String clusterId)
                           throws java.io.IOException,
                                  org.xml.sax.SAXException,
                                  FlickrException
Returns the first 24 photos for a given tag cluster.

This method does not require authentication.

Parameters:
tag -
clusterId -
Returns:
PhotoList
Throws:
java.io.IOException
org.xml.sax.SAXException
FlickrException

getHotList

public java.util.Collection getHotList(java.lang.String period,
                                       int count)
                                throws java.io.IOException,
                                       org.xml.sax.SAXException,
                                       FlickrException
Returns a list of hot tags for the given period.

This method does not require authentication.

Parameters:
period - valid values are 'day' or 'week'
count - maximum is 200
Returns:
The collection of HotlistTag objects
Throws:
java.io.IOException
org.xml.sax.SAXException
FlickrException

getListPhoto

public Photo getListPhoto(java.lang.String photoId)
                   throws java.io.IOException,
                          org.xml.sax.SAXException,
                          FlickrException
Get a list of tags for the specified photo.

This method does not require authentication.

Parameters:
photoId - The photo ID
Returns:
The collection of Tag objects
Throws:
java.io.IOException
org.xml.sax.SAXException
FlickrException

getListUser

public java.util.Collection getListUser(java.lang.String userId)
                                 throws java.io.IOException,
                                        org.xml.sax.SAXException,
                                        FlickrException
Get a collection of tags used by the specified user.

This method does not require authentication.

Parameters:
userId - The User ID
Returns:
The User object
Throws:
java.io.IOException
org.xml.sax.SAXException
FlickrException

getListUserPopular

public java.util.Collection getListUserPopular(java.lang.String userId)
                                        throws java.io.IOException,
                                               org.xml.sax.SAXException,
                                               FlickrException
Get a list of the user's popular tags.

This method does not require authentication.

Parameters:
userId - The user ID
Returns:
The collection of Tag objects
Throws:
java.io.IOException
org.xml.sax.SAXException
FlickrException

getListUserRaw

public java.util.Collection getListUserRaw(java.lang.String tagVal)
                                    throws java.io.IOException,
                                           org.xml.sax.SAXException,
                                           FlickrException
Get a list of the user's (identified by token) popular tags.

This method does not require authentication.

Parameters:
tagVal - a tag to search for, or null
Returns:
The collection of Tag objects
Throws:
java.io.IOException
org.xml.sax.SAXException
FlickrException

getRelated

public RelatedTagsList getRelated(java.lang.String tag)
                           throws java.io.IOException,
                                  org.xml.sax.SAXException,
                                  FlickrException
Get the related tags.

This method does not require authentication.

Parameters:
tag - The source tag
Returns:
A RelatedTagsList object
Throws:
java.io.IOException
org.xml.sax.SAXException
FlickrException


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