public class CommentsInterface
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
METHOD_ADD_COMMENT |
static java.lang.String |
METHOD_DELETE_COMMENT |
static java.lang.String |
METHOD_EDIT_COMMENT |
static java.lang.String |
METHOD_GET_LIST |
static java.lang.String |
METHOD_GET_RECENT |
| Constructor and Description |
|---|
CommentsInterface(java.lang.String apiKey,
java.lang.String sharedSecret,
Transport transport) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
addComment(java.lang.String photoId,
java.lang.String commentText)
Add comment to a photo as the currently authenticated user.
|
void |
deleteComment(java.lang.String commentId)
Delete a comment as the currently authenticated user.
|
void |
editComment(java.lang.String commentId,
java.lang.String commentText)
Edit the text of a comment as the currently authenticated user.
|
java.util.List<Comment> |
getList(java.lang.String photoId)
Returns the comments for a photo.
|
PhotoList<Photo> |
getRecentForContacts(java.util.Date lastComment,
java.util.ArrayList<java.lang.String> contactsFilter,
java.util.Set<java.lang.String> extras,
int perPage,
int page)
Returns the list of photos belonging to your contacts that have been commented on recently.
|
public static final java.lang.String METHOD_ADD_COMMENT
public static final java.lang.String METHOD_DELETE_COMMENT
public static final java.lang.String METHOD_EDIT_COMMENT
public static final java.lang.String METHOD_GET_LIST
public static final java.lang.String METHOD_GET_RECENT
public CommentsInterface(java.lang.String apiKey,
java.lang.String sharedSecret,
Transport transport)
public java.lang.String addComment(java.lang.String photoId,
java.lang.String commentText)
throws FlickrException
photoId - The id of the photo to add a comment to.commentText - Text of the comment.FlickrExceptionpublic void deleteComment(java.lang.String commentId)
throws FlickrException
commentId - The id of the comment to delete.FlickrExceptionpublic void editComment(java.lang.String commentId,
java.lang.String commentText)
throws FlickrException
commentId - The id of the comment to edit.commentText - Update the comment to this text.FlickrExceptionpublic java.util.List<Comment> getList(java.lang.String photoId) throws FlickrException
photoId - The id of the photo to fetch comments for.Comment objects.FlickrExceptionpublic PhotoList<Photo> getRecentForContacts(java.util.Date lastComment, java.util.ArrayList<java.lang.String> contactsFilter, java.util.Set<java.lang.String> extras, int perPage, int page) throws FlickrException
Returns the list of photos belonging to your contacts that have been commented on recently.
There is an emphasis on the recent part with this method, which is fancy-talk for "in the last hour".
It is not meant to be a general purpose, get all the comments ever, but rather a quick and easy way to bubble up photos that people are talking about ("about") now.
It has the added bonus / side-effect of bubbling up photos a person may have missed because they were uploaded before the photo owner was made a contact or the business of life got in the way.
This method requires authentication with 'read' permission.lastComment - Limits the resultset to photos that have been commented on since this date. The default, and maximum, offset is (1) hour. Optional, can be
null.contactsFilter - A list of contact NSIDs to limit the scope of the query to. Optional, can be null.extras - A list of extra information to fetch for each returned record. Optional, can be null.perPage - The number of photos per page.page - The page offset.FlickrException