Class to describe a group from Flickr.
Instances of this class are created to hold groups who have been returned in data from calls to the Flickr API.
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: Group.as 79 2006-09-06 16:57:39Z kluck $
| com. kelvinluck. flashr. core. Group | Class to describe a group from Flickr. |
| PRIVACY_PRIVATE | Constant for privacy value for private groups. |
| PRIVACY_INVITE_ONLY | Constant for privacy value for invite only groups. |
| PRIVACY_PUBLIC | Constant for privacy value for public groups. |
| nsid | This group’s nsid. |
| name | The name of this group. |
| eighteenPlus | Whether this group is visible to members over 18 only. |
| description | The description of this Group. |
| members | The number of members in this Group. |
| privacy | The privacy setting of this group. |
| _pool | This Groups photo pool. |
| numPhotos | The number of Photos in this Groups pool. |
| _groups | A private static Object containing Group objects. |
| Group | |
| _addPhoto | Private internal function - adds a Photo to this Groups _pool. |
| _removePhoto | Private internal function - removes a Photo from this Groups _pool. |
| getPhotos | Get’s this Groups _pool |
| getGroup | Get’s a Group object for the given nsid. |
static var PRIVACY_PRIVATE: Number
Constant for privacy value for private groups.
static var PRIVACY_INVITE_ONLY: Number
Constant for privacy value for invite only groups.
static var PRIVACY_PUBLIC: Number
Constant for privacy value for public groups.
var description: String
The description of this Group.
var members: Number
The number of members in this Group.
private static var _groups: Object
A private static Object containing Group objects. Used by getGroup to insure that only one Group is created for each nsid returned from flickr.com
private function _addPhoto( photo: Photo )
Private internal function - adds a Photo to this Groups _pool. If you want to do this you are probably looking for Flashr.groupsPoolsAdd
| photo | The Photo to add. |
private function _removePhoto( photo: Photo )
Private internal function - removes a Photo from this Groups _pool. If you want to do this you are probably looking for Flashr.groupsPoolsRemove.
| photo | The Photo to remove. |
public static function getGroup( nsid: String ):Group
Get’s a Group object for the given nsid.
Consults _groups to make sure that only one Group instance is created for each nsid from flickr.com
| nsid | The nsid of the Group you want to get. |
Constant for privacy value for private groups.
static var PRIVACY_PRIVATE: Number
The privacy setting of this group.
var privacy: Number
Constant for privacy value for invite only groups.
static var PRIVACY_INVITE_ONLY: Number
Constant for privacy value for public groups.
static var PRIVACY_PUBLIC: Number
This group’s nsid.
public var nsid: String
The name of this group.
public var name: String
Whether this group is visible to members over 18 only.
public var eighteenPlus: Boolean
The description of this Group.
var description: String
private function Group( nsid: String )
The number of members in this Group.
var members: Number
This Groups photo pool.
private var _pool: Array
The number of Photos in this Groups pool.
var numPhotos: Number
A private static Object containing Group objects.
private static var _groups: Object
Private internal function - adds a Photo to this Groups _pool.
private function _addPhoto( photo: Photo )
Private internal function - removes a Photo from this Groups _pool.
private function _removePhoto( photo: Photo )
Get’s this Groups _pool
function getPhotos():Array
Get’s a Group object for the given nsid.
public static function getGroup( nsid: String ):Group
Add a photo to a group’s pool.
function groupsPoolsAdd( photoId: String, groupId: String ):FlashrRequest
Remove a photo from a group pool.
function groupsPoolsRemove( photoId: String, groupId: String ):FlashrRequest