Class to describe a note on a photo on Flickr.
Instances of this class are created to hold notes that are attached to Photos returned from flickr.com
Currently very bare bones - this class will be expanded
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: Note.as 77 2006-09-04 15:07:10Z kluck $
| com. kelvinluck. flashr. core.Note | Class to describe a note on a photo on Flickr. |
| id | This note’s if |
| author | The person who wrote this note |
| text | The contents of this note |
| x | The x coordinate of this note |
| y | The y coordinate of this note |
| width | The width of this note |
| height | The height of this note |
| photo | The Photo that this Note is on. |
| _notes | A private static Object containing Note objects. |
| Note | |
| destroy | Destroys and deletes this Note. |
| getNote | Get’s a Note object for the given id. |
public var photo: Photo
The Photo that this Note is on. Filled on a call to Flashr.photosNotesAdd or Flashr.photosGetInfo.
private static var _notes: Object
A private static Object containing Note objects. Used by getNote to insure that only one Note is created for each note id from flickr.com
private function Note( id: String )
| Constructor function | creates a new Note object. |
Don’t call directly, use getNote to make sure that there is only one Note instance for each id as returned by flickr.com
private function destroy()
Destroys and deletes this Note. Private and called internally on a sucessful response from Flashr.photosNotesDelete.
public static function getNote( id: String ):Note
Get’s a Note object for the given id.
Consults _notes to make sure that only one Note instance is created for each note id from flickr.com
| id | The id of the Note you want to get |
This note’s if
public var id: String
The person who wrote this note
public var author: Person
The contents of this note
public var text: String
The x coordinate of this note
public var x: Number
The y coordinate of this note
public var y: Number
The width of this note
public var width: Number
The height of this note
public var height: Number
The Photo that this Note is on.
public var photo: Photo
private function Note( id: String )
A private static Object containing Note objects.
private static var _notes: Object
Destroys and deletes this Note.
private function destroy()
Get’s a Note object for the given id.
public static function getNote( id: String ):Note
Add a Note to a Photo.
function photosNotesAdd( photoId: String, noteX: Number, noteY: Number, noteW: Number, noteH: Number, noteText: String )
Calls flickr.photos.getInfo to get information about a Photo.
function photosGetInfo ( photoId: String, secret: String ):FlashrRequest
Delete a Note from a Photo.
function photosNotesDelete( noteId: String )