def get_images(self, album_id, auth_userid, glob, limit, offset): """ Gets a list of the images in an album, with optional limit/offset. @param album_id: Album to get images for. @type album_id: Integer @param auth_username: Logged in user @type auth_username: String @param limit: Number of images to get @type limit: Integer @param offset: Offset within the album to start getting images @type offset: Integer """ try: album_id = validation.cast_integer(album_id, 'album_id') if auth_userid: auth_userid = validation.cast_integer(auth_userid, 'auth_userid') limit = validation.cast_integer(limit, 'limit') offset = validation.cast_integer(offset, 'offset') validation.instanceof(glob, dict, 'glob') except errors.ValidationError, ex: return utils.return_deferred_error(ex.value)
def get_contact_groups(self, member_userid, glob, limit, offset): """ Get a list of contact groups @param member_username: User account to get info for. @type member_username: String @param glob: A dictionary of settings @type glob : Dict @param limit: Number of contact groups to return. @type limit: Integer @param offset: Offset with the group list. @type offset: Integer @return: List of contact groups @rtype: (Deferred) List """ try: member_userid = validation.cast_integer(member_userid, 'member_userid') limit = validation.cast_integer(limit, 'limit') offset = validation.cast_integer(offset, 'offset') validation.instanceof(glob, dict, 'glob') except errors.ValidationError, ex: return utils.return_deferred_error(ex.value)
def get_not_contacts(self, member_userid, glob, limit, offset): """ Gets a list of user contacts, optionally from a specific group. @param owner_username: The account owner. @type owner_username: String @param glob: A dictionary of settings @type glob : Dict @param limit: The max results to return. @type limit: Integer @param offset: Offset of the result set @type offset: Integer """ try: member_userid = validation.cast_integer(member_userid, "member_userid") limit = validation.cast_integer(limit, 'limit') offset = validation.cast_integer(offset, 'offset') validation.instanceof(glob, dict, 'glob') except errors.ValidationError, ex: return utils.return_deferred_error(ex.value)
def set_options(self, owner_userid, album_id, options): """ Sets the options for an album template. @param owner_userid: Owner userid @type owner_userid: Integer @param album_id: Album ID @type album_id: Integer @param options: Options dict @type options: Dictionary """ try: owner_userid = validation.cast_integer(owner_userid, 'owner_userid') album_id = validation.cast_integer(album_id, 'album_id') validation.instanceof(options, dict, 'options') except errors.ValidationError, ex: return utils.return_deferred_error(ex.value)
def get_contacts(self, member_userid, glob, limit, offset): """ Gets a list of user contacts, optionally from a specific group. @param owner_username: The account owner. @type owner_username: String @param glob: A dictionary of settings @type glob : Dict @param limit: The max results to return. @type limit: Integer @param offset: Offset of the result set @type offset: Integer """ try: member_userid = validation.cast_integer(member_userid, "member_userid") limit = validation.cast_integer(limit, 'limit') offset = validation.cast_integer(offset, 'offset') validation.instanceof(glob, dict, 'glob') except errors.ValidationError, ex: return utils.return_deferred_error(ex.value)