perceval/backends/core/discourse.py
def _call(self, res, res_id, params):
        """Run an API command.

        :param res: type of resource to fetch
        :param res_id: identifier of the resource
        :param params: dict with the HTTP parameters needed to run
            the given command
        """
        if res:
            url = urijoin(self.base_url, res, res_id)
        else:
            url = urijoin(self.base_url, res_id)
        url += self.TJSON

        logger.debug("Discourse client calls resource: %s %s params: %s",
                     res, res_id, str(params))

        r = self.fetch(url, payload=params)
        return r.text
def _call(self, res, res_id, params):
        """Run an API command.

        :param res: type of resource to fetch
        :param res_id: identifier of the resource
        :param params: dict with the HTTP parameters needed to run
            the given command
        """
        if res:
            url = urijoin(self.base_url, res, res_id)
        else:
            url = urijoin(self.base_url, res_id)
        url += self.TJSON

        logger.debug("Discourse client calls resource: %s %s params: %s",
                     res, res_id, str(params))

        r = self.fetch(url, payload=params)
        return r.text
def _call ( self , res , res_id , params ) : if res : url = urijoin ( self . base_url , res , res_id ) else : url = urijoin ( self . base_url , res_id ) url += self . TJSON logger . debug ( "Discourse client calls resource: %s %s params: %s" , res , res_id , str ( params ) ) r = self . fetch ( url , payload = params ) return r . text
Run an API command.

        :param res: type of resource to fetch
        :param res_id: identifier of the resource
        :param params: dict with the HTTP parameters needed to run
            the given command
Run an API command .