com. kelvinluck. flickr. PersonClass to describe a person from Flickr. Instances of this class are created to hold people who have been returned in data from calls to the Flickr API. Version0.1.0 AuthorKelvin Luck < kelvin at kelvinluck dot com > Summary
online
If this person is online. This relates to their status in the Flickr Live system (http://flickr.com/_chat/chat.gne) Possible Values
awayMessage
This person’s away message (if they are away). This relates to the Flickr Live system (http://flickr.com/_chat/chat.gne) _photos
An Array containing references to all of this Person’s photos. Can be filled up bit by bit as a result of calls to e.g. Flickr.photosGetInfo TODOIs this a good idea? Do we need to link people back to their photos like this within the library? _tags
An Object containing references to all of this Person’s Tag’s _favorites
An Array containing references to all of this Person’s favourites as Photo objects indexed by the id of each of the favourites. See Also<getFavourites> <addFavourite> _people
A private static Object containing Person objects. Used by getPerson to insure that only one Person is created for each nsid returned from flickr.com addPublicGroup
Add’s a public group to this user and notes whether this user is an admin of that group. Parameters
See AlsogetPublicGroups
Gets a list of the public groups that a user is a member of (if Flickr.peopleGetPublicGroups has been called for that user. TODOShould this call Flickr.peopleGetPublicGroups automatically if it hasn’t been called? Probably not because then it would become asyncronous and couldn’t return the result immediately ReturnsAn Array of Objects containing two items group (a Group) and isAdmin (a Boolean) which marks whether this Person is an administrator of that Group See AlsoaddPublicContact
Add’s a public contact to this user Parameters
See AlsogetPublicContacts
Gets a list of the public contacts that this user has (if addPublicContact has been called for this user. ReturnsAn Object containing Person objects indexed by their nsids. See AlsogetTags
Get’s this persons _tags. getPerson
Get’s a Person object for the given nsid. Consults _people to make sure that only one Person instance is created for each nsid from flickr.com Parameters
|
This person’s nsid.
public var nsid: String
This person’s username.
public var username: String
This person’s email address.
public var email: String
Used to build the url to the users’ buddyicon
public var iconServer: Number
If this person is a friend.
public var friend: Boolean
If this person is family.
public var family: Boolean
If this person is ignored.
public var ignored: Boolean
If this person is online.
public var online: Number
This person’s away message (if they are away).
public var awayMessage: String
This person’s real name.
public var realname: String
This person’s location.
public var location: String
The number of photos this user has taken.
public var numPhotos: String
The date this persons first photograph was uploaded.
public var photosFirstDate: Date
The date this persons first photograph was taken.
public var photosFirstDateTaken: Date
An Array containing references to all of this Person’s photos.
private var _photos: Array
An Object containing references to all of this Person’s Tag’s
private var _tags: Object
An Array containing references to all of this Person’s contacts.
private var _publicContacts: Object
An Array containing references to all of this Person’s favourites as Photo objects indexed by the id of each of the favourites.
private var _favorites: Object
A private static Object containing Person objects.
private static var _people: Object
function Person( nsid: String )
Add’s a public group to this user and notes whether this user is an admin of that group.
function addPublicGroup( group: Group, isAdmin: Boolean ):Void
Gets a list of the public groups that a user is a member of (if Flickr.peopleGetPublicGroups has been called for that user.
function getPublicGroups():Array
Calls flickr.people.getPublicGroups to get the list of public groups a user is a member of.
function peopleGetPublicGroups( nsid: String )
Add’s a public contact to this user
function addPublicContact( contact: Person ):Void
Gets a list of the public contacts that this user has (if addPublicContact has been called for this user.
function getPublicContacts():Object
Add’s a favourite Photo to this user.
function addFavorite( photo: Photo ):Void
Gets a list of the favorite Photo’s that this user has.
function getFavorites():Object
Adds this Photo into this Person’s _photos Array if it isn’t already there
function addPhoto( photo: Photo ):Void
Adds a Tag into this Person’s _tags Array if it isn’t already there
function addTag( tag: Tag, count: Number ):Void
Get’s this persons _tags.
public function getTags():Object
Get’s a Person object for the given nsid.
public static function getPerson( nsid: String ):Person
Calls flickr.photos.getInfo to get information about a photo..
function photosGetInfo ( photoId: Number, secret: Number )
Calls flickr.contacts.getPublicList to get a list of contacts a user.
public function contactsGetPublicList( nsid: String )
Calls flickr.favorites.getPublicList to get a list of favorite public photos for the given user.
public function favoritesGetPublicList( userId: String, perPage: Number, page: Number )