'Entry point for REST interface
@param r: the S3Request
@param attr: controller attributes'

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

    if ('w' in r.get_vars):
        return self.ajax(r, **attr)
    else:
        return self.summary(r, **attr)
