def _request(self, method='', params=dict()):
        #unpack our params
        if type(params) == type(()) and len(params) > 0: 
            method_arguments = dict(params[0])
        else:
            method_arguments = {}

        # Add authentication tokens
        if 'access_token' not in self._auth_tokens:
            method_arguments.update(self._auth_tokens)

        # urlencode API method parameters
        encoded_params = urllib.urlencode(method_arguments)
        
        # construct our request url
        request_url = self.eventbrite_request_template % dict(host=self.eventbrite_api_endpoint, method=method, arguments=encoded_params)
        #self.logger.debug("REQ - %s", request_url)

        # Send a GET request to Eventbrite
        # if using OAuth2.0 for authentication, set additional headers
        if 'access_token' in self._auth_tokens:
            self._https_connection.request('GET', request_url, None, {'Authorization': "Bearer " + self._auth_tokens['access_token']})
        else:
            self._https_connection.request('GET', request_url)

        # extending the timeout window per request (not system-wide) 
        # requires python 2.5 or better:
        if int(sys.version[0]) >= 2 and int(sys.version[2]) >= 5:
            self._https_connection.sock.settimeout(200)

        # Read the JSON response 
        response_data = self._https_connection.getresponse().read()
        #self.logger.debug("RES - %s", response_data)

        # decode our response
        response = json_lib.loads(response_data)
        if 'error' in response and 'error_message' in response['error'] :
            raise EnvironmentError( response['error']['error_message'] )
        return response
Flush data that is left in the buffer.
dataset/ETHPy150Open eventbrite/eventbrite-client-py/eventbrite/client.py/EventbriteClient._request--crossover with--dataset/ETHPy150Open ipython/ipython-py3k/IPython/lib/pretty.py/PrettyPrinter.flush