'Entry point for REST controller
@param r: the S3Request
@param attr: dictionary of parameters for the method handler
@return: output object to send to the view'

def apply_method(self, r, **attr):

    if (r.http in ('GET', 'POST')):
        if (((r.representation == 'html') and r.id) or (r.representation == 'aadata')):
            return self.add_members(r, **attr)
        else:
            r.error(415, current.ERROR.BAD_FORMAT)
    else:
        r.error(405, current.ERROR.BAD_METHOD)
