Class to describe a comment on a photo on Flickr.
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...
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.
0.5.0
Kelvin Luck < kelvin at kelvinluck dot com >
$Id: Comment.as 79 2006-09-06 16:57:39Z kluck $
| com. kelvinluck. flashr. core. Comment | Class to describe a comment on a photo on Flickr. |
| id | This comment’s id. |
| author | A reference to the Person who made this comment. |
| created | The date this comment was made on. |
| url | This permalink to this comment. |
| comment | The actual contents of this comment. |
| photo | The Photo that this comment is on. |
| deleted | A flag saying whether this Comment has been deleted. |
| _comments | A private static Object containing Comment objects. |
| Comment | Constructor function - creates a new Comment object. |
| _destroy | Destroys and deletes this Comment. |
| getComment | Get’s a Comment object for the given comment ID. |
public var author: Person
A reference to the Person who made this comment.
public var photo: Photo
The Photo that this comment is on.
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
private function Comment( id: String )
Constructor function - creates a new Comment object.
Should be called via Comment.getComment
private function _destroy()
Destroys and deletes this Comment. Private and called internally on a sucessful response from Flashr.photosCommentsDeleteComment.
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
| commentId | The id of the Comment you want to get |
The Comment object for the given id
This comment’s id.
public var id: String
A reference to the Person who made this comment.
public var author: Person
The date this comment was made on.
public var created: Date
This permalink to this comment.
public var url: String
The actual contents of this comment.
public var comment: String
The Photo that this comment is on.
public var photo: Photo
A flag saying whether this Comment has been deleted.
public var deleted: Boolean
Constructor function - creates a new Comment object.
private function Comment( id: String )
A private static Object containing Comment objects.
private static var _comments: Object
Destroys and deletes this Comment.
private function _destroy()
Get’s a Comment object for the given comment ID.
public static function getComment( commentId: String ):Comment
Calls flickr.photos.comments.deleteComment to delete a comment as the currently authenticated user (authUser).
function photosCommentsDeleteComment( commentId: String ):FlashrRequest