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. AuthorKelvin Luck < kelvin at kelvinluck dot com > Summary
_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 _tags
An Object containing references to all of this Person’s Tag’s _photosets_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 AlsoaddFavorite
Adds a favourite Photo to this user. NOTE, this just updates the internal representation of the user, It doesn’t add the favorite on the flickr website. See Flickr.favoritesAdd if this is what you want to do. Parameters
See AlsoremoveFavorite
Removes a favourite Photo from this user. NOTE, this just updates the internal representation of the user, It doesn’t remove the favorite on the flickr website. See Flickr.favoritesRemove if this is what you want to do. Parameters
See AlsoaddPhotoset
Adds this Photoset into this Person’s _photosets Array if it isn’t already there Parameters
getPhotosets
Returns this Person’s _photosets Array. ReturnsAn Array of Photoset objects. removePhotoset
Removes this Photoset into this Person’s _photosets Array Parameters
getTags
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
This person’s real name.
public var realname: String
This person’s location.
public var location: String
This person’s mboxSha1sum.
public var mboxSha1sum: 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
The bandwidth this user has available, in bytes per month.
public var bandwidthMax: Number
The bandwidth this user has used this month, in bytes.
public var bandwidthUsed: Number
The maximum size per file that this user can upload, in bytes.
public var filesizeMax: Number
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 this user’s Photosets
private var _photosets: Array
An Array containing references to this user’s Groups
private var _groups: Array
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
Adds a favourite Photo to this user.
function addFavorite( photo: Photo ):Void
Removes a favourite Photo from this user.
function removeFavorite( 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
Returns this Person’s _photos Array.
function getPhotos():Array
Adds this Photoset into this Person’s _photosets Array if it isn’t already there
function addPhotoset( photoset: Photoset ):Void
Returns this Person’s _photosets Array.
function getPhotosets():Array
function clearPhotosets()
Adds this Group into this Person’s _groups Array if it isn’t already there
function addGroup( group: Group ):Void
Returns this Person’s _groups Array.
function getGroups():Array
Removes this Photoset into this Person’s _photosets Array
function removePhotoset( photoset: Photoset ):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: String )
Calls flickr.contacts.getPublicList to get a list of contacts a user.
public function contactsGetPublicList( nsid: String )
Calls flickr.favorites.add to add a photo to a user’s favorites list.
public function favoritesAdd( photoId: Number )
Calls flickr.favorites.getPublicList to get a list of favorite public photos for the given user.
public function favoritesGetPublicList( userId: String, extras: String, perPage: Number, page: Number )
Calls flickr.favorites.remove to remove a photo from a user’s favorites list.
public function favoritesRemove( photoId: Number )