com.aetrion.flickr.favorites
Class FavoritesInterface

java.lang.Object
  extended by com.aetrion.flickr.favorites.FavoritesInterface

public class FavoritesInterface
extends java.lang.Object

Interface for working with Flickr favorites.

Version:
$Id: FavoritesInterface.java,v 1.17 2009/07/11 20:30:27 x-mago Exp $
Author:
Anthony Eden

Field Summary
static java.lang.String METHOD_ADD
           
static java.lang.String METHOD_GET_LIST
           
static java.lang.String METHOD_GET_PUBLIC_LIST
           
static java.lang.String METHOD_REMOVE
           
 
Constructor Summary
FavoritesInterface(java.lang.String apiKey, java.lang.String sharedSecret, Transport transportAPI)
           
 
Method Summary
 void add(java.lang.String photoId)
          Add a photo to the user's favorites.
 PhotoList getList(java.lang.String userId, int perPage, int page, java.util.Set extras)
          Get the collection of favorites for the calling user or the specified user ID.
 PhotoList getPublicList(java.lang.String userId, int perPage, int page, java.util.Set extras)
          Get the specified user IDs public contacts.
 void remove(java.lang.String photoId)
          Remove the specified photo from the user's favorites.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

METHOD_ADD

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

METHOD_GET_LIST

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

METHOD_GET_PUBLIC_LIST

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

METHOD_REMOVE

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

FavoritesInterface

public FavoritesInterface(java.lang.String apiKey,
                          java.lang.String sharedSecret,
                          Transport transportAPI)
Method Detail

add

public void add(java.lang.String photoId)
         throws java.io.IOException,
                org.xml.sax.SAXException,
                FlickrException
Add a photo to the user's favorites.

Parameters:
photoId - The photo ID
Throws:
java.io.IOException
org.xml.sax.SAXException
FlickrException

getList

public PhotoList getList(java.lang.String userId,
                         int perPage,
                         int page,
                         java.util.Set extras)
                  throws java.io.IOException,
                         org.xml.sax.SAXException,
                         FlickrException
Get the collection of favorites for the calling user or the specified user ID.

Parameters:
userId - The optional user ID. Null value will be ignored.
perPage - The optional per page value. Values <= 0 will be ignored.
page - The page to view. Values <= 0 will be ignored.
extras - a Set Strings representing extra parameters to send
Returns:
The Collection of Photo objects
Throws:
java.io.IOException
org.xml.sax.SAXException
FlickrException
See Also:
Extras

getPublicList

public PhotoList getPublicList(java.lang.String userId,
                               int perPage,
                               int page,
                               java.util.Set extras)
                        throws java.io.IOException,
                               org.xml.sax.SAXException,
                               FlickrException
Get the specified user IDs public contacts. This method does not require authentication.

Parameters:
userId - The user ID
perPage - The optional per page value. Values <= 0 will be ignored.
page - The optional page to view. Values <= 0 will be ignored
extras - A Set of extra parameters to send
Returns:
A Collection of Photo objects
Throws:
java.io.IOException
org.xml.sax.SAXException
FlickrException
See Also:
Extras

remove

public void remove(java.lang.String photoId)
            throws java.io.IOException,
                   org.xml.sax.SAXException,
                   FlickrException
Remove the specified photo from the user's favorites.

Parameters:
photoId - The photo id
Throws:
java.io.IOException
org.xml.sax.SAXException
FlickrException


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