perceval/backends/core/bugzillarest.py
def call(self, resource, params):
        """Retrive the given resource.

        :param resource: resource to retrieve
        :param params: dict with the HTTP parameters needed to retrieve
            the given resource

        :raises BugzillaRESTError: raised when an error is returned by
            the server
        """
        url = self.URL % {'base': self.base_url, 'resource': resource}

        if self.api_token:
            params[self.PBUGZILLA_TOKEN] = self.api_token

        logger.debug("Bugzilla REST client requests: %s params: %s",
                     resource, str(params))

        r = self.fetch(url, payload=params)

        # Check for possible Bugzilla API errors
        result = r.json()

        if result.get('error', False):
            raise BugzillaRESTError(error=result['message'],
                                    code=result['code'])

        return r.text
def call(self, resource, params):
        """Retrive the given resource.

        :param resource: resource to retrieve
        :param params: dict with the HTTP parameters needed to retrieve
            the given resource

        :raises BugzillaRESTError: raised when an error is returned by
            the server
        """
        url = self.URL % {'base': self.base_url, 'resource': resource}

        if self.api_token:
            params[self.PBUGZILLA_TOKEN] = self.api_token

        logger.debug("Bugzilla REST client requests: %s params: %s",
                     resource, str(params))

        r = self.fetch(url, payload=params)

        # Check for possible Bugzilla API errors
        result = r.json()

        if result.get('error', False):
            raise BugzillaRESTError(error=result['message'],
                                    code=result['code'])

        return r.text
def call ( self , resource , params ) : url = self . URL % { 'base' : self . base_url , 'resource' : resource } if self . api_token : params [ self . PBUGZILLA_TOKEN ] = self . api_token logger . debug ( "Bugzilla REST client requests: %s params: %s" , resource , str ( params ) ) r = self . fetch ( url , payload = params ) # Check for possible Bugzilla API errors result = r . json ( ) if result . get ( 'error' , False ) : raise BugzillaRESTError ( error = result [ 'message' ] , code = result [ 'code' ] ) return r . text
Retrive the given resource.

        :param resource: resource to retrieve
        :param params: dict with the HTTP parameters needed to retrieve
            the given resource

        :raises BugzillaRESTError: raised when an error is returned by
            the server
Retrive the given resource .