addons14/base_rest/components/service.py
def dispatch(self, method_name, *args, params=None):
        """
        This method dispatch the call to the final method.
        Before the call parameters are processed by the
        `restapi.RestMethodParam` object specified as input_param object.
        The result of the method is therefore given to the
        `restapi.RestMethodParam` object specified as output_param to build
        the final response returned by the service
        :param method_name:
        :param *args: query path paramters args
        :param params: A dictionary with the parameters of the method. Once
                       secured and sanitized, these parameters will be passed
                       to the method as keyword args.
        :return:
        """
        method = getattr(self, method_name, object())
        params = params or {}
        secure_params = self._prepare_input_params(method, params)
        if isinstance(secure_params, dict):
            # for backward compatibility methods expecting json params
            # are declared as m(self, p1=None, p2=None) or m(self, **params)
            res = method(*args, **secure_params)
        else:
            res = method(*args, secure_params)
        self._log_call(method, params, secure_params, res)
        return self._prepare_response(method, res)

        This method dispatch the call to the final method.
        Before the call parameters are processed by the
        `restapi.RestMethodParam` object specified as input_param object.
        The result of the method is therefore given to the
        `restapi.RestMethodParam` object specified as output_param to build
        the final response returned by the service
        :param method_name:
        :param *args: query path paramters args
        :param params: A dictionary with the parameters of the method. Once
                       secured and sanitized, these parameters will be passed
                       to the method as keyword args.
        :return:
        
This method dispatch the call to the final method.
Before the call parameters are processed by the
`restapi.RestMethodParam` object specified as input_param object.
The result of the method is therefore given to the
`restapi.RestMethodParam` object specified as output_param to build
the final response returned by the service
This method dispatch the call to the final method . Before the call parameters are processed by the ` restapi . RestMethodParam ` object specified as input_param object . The result of the method is therefore given to the ` restapi . RestMethodParam ` object specified as output_param to build the final response returned by the service
def dispatch(self, method_name, *args, params=None):
        method = getattr(self, method_name, object())
        params = params or {}
        secure_params = self._prepare_input_params(method, params)
        if isinstance(secure_params, dict):
            res = method(*args, **secure_params)
        else:
            res = method(*args, secure_params)
        self._log_call(method, params, secure_params, res)
        return self._prepare_response(method, res)
def dispatch ( self , method_name , * args , params = None ) : method = getattr ( self , method_name , object ( ) ) params = params or { } secure_params = self . _prepare_input_params ( method , params ) if isinstance ( secure_params , dict ) : res = method ( * args , ** secure_params ) else : res = method ( * args , secure_params ) self . _log_call ( method , params , secure_params , res ) return self . _prepare_response ( method , res )
This method dispatch the call to the final method.
This method dispatch the call to the final method .
"""
        This method dispatch the call to the final method.
        Before the call parameters are processed by the
        `restapi.RestMethodParam` object specified as input_param object.
        The result of the method is therefore given to the
        `restapi.RestMethodParam` object specified as output_param to build
        the final response returned by the service
        :param method_name:
        :param *args: query path paramters args
        :param params: A dictionary with the parameters of the method. Once
                       secured and sanitized, these parameters will be passed
                       to the method as keyword args.
        :return:
        """ # for backward compatibility methods expecting json params # are declared as m(self, p1=None, p2=None) or m(self, **params)
None
self
method_name
None
params
A dictionary with the parameters of the method. Once
secured and sanitized, these parameters will be passed
to the method as keyword args.
A dictionary with the parameters of the method . Once secured and sanitized these parameters will be passed to the method as keyword args .
*args
query path paramters args
query path paramters args