com. kelvinluck. flashr. core. Comment

Class to describe a comment on a photo on Flickr.

TODO

Should a comment somehow be associated with it’s author?  So that you had Person.getComments or something?  Probably doesn’t make sense because there is no current way to get all of a user’s comments without checking the comments on every photo...

Licence

This code and documentation is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0.  http://creativecommons.org/licenses/by-nc-sa/2.0/

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Version

0.5.0

Author

Kelvin Luck < kelvin at kelvinluck dot com >

Project Website

http://flashr.kelvinluck.com/

Subversion Id

$Id: Comment.as 79 2006-09-06 16:57:39Z kluck $

Summary
com. kelvinluck. flashr. core. CommentClass to describe a comment on a photo on Flickr.
idThis comment’s id.
authorA reference to the Person who made this comment.
createdThe date this comment was made on.
urlThis permalink to this comment.
commentThe actual contents of this comment.
photoThe Photo that this comment is on.
deletedA flag saying whether this Comment has been deleted.
_commentsA private static Object containing Comment objects.
CommentConstructor function - creates a new Comment object.
_destroyDestroys and deletes this Comment.
getCommentGet’s a Comment object for the given comment ID.

id

public var id: String

This comment’s id.

author

public var author: Person

A reference to the Person who made this comment.

created

public var created: Date

The date this comment was made on.

url

public var url: String

This permalink to this comment.

comment

public var comment: String

The actual contents of this comment.

photo

public var photo: Photo

The Photo that this comment is on.

deleted

public var deleted: Boolean

A flag saying whether this Comment has been deleted.

See Also

Flashr.photosCommentsDeleteComment

_comments

private static var _comments: Object

A private static Object containing Comment objects.  Used by getComment to insure that only one Comment is created for each comment ID returned from flickr.com

Comment

private function Comment(id: String)

Constructor function - creates a new Comment object.

Should be called via Comment.getComment

_destroy

private function _destroy()

Destroys and deletes this Comment.  Private and called internally on a sucessful response from Flashr.photosCommentsDeleteComment.

getComment

public static function getComment(commentId: String):Comment

Get’s a Comment object for the given comment ID.

Consults _comments to make sure that only one Comment instance is created for each comment ID from flickr.com

Parameters

commentIdThe id of the Comment you want to get

Returns

The Comment object for the given id

public var id: String
This comment’s id.
public var author: Person
A reference to the Person who made this comment.
Class to describe a person from Flickr.
public var created: Date
The date this comment was made on.
public var url: String
This permalink to this comment.
public var comment: String
The actual contents of this comment.
public var photo: Photo
The Photo that this comment is on.
Class to describe a photo from Flickr.
public var deleted: Boolean
A flag saying whether this Comment has been deleted.
private function Comment(id: String)
Constructor function - creates a new Comment object.
private static var _comments: Object
A private static Object containing Comment objects.
private function _destroy()
Destroys and deletes this Comment.
public static function getComment(commentId: String):Comment
Get’s a Comment object for the given comment ID.
function photosCommentsDeleteComment(commentId: String):FlashrRequest
Calls flickr.photos.comments.deleteComment to delete a comment as the currently authenticated user (authUser).