:param params: dict
        :return: pybomb.clients.response
960271
def _query(self, params, direct=False):
        
        params["api_key"] = self._api_key

        if "format" not in params:
            params["format"] = self._default_format

        response = self._query_api(params, direct)
        self._validate_response(response)

        return Response.from_response_data(response)
337312
def __get_param(self, param):
        
        try:
            return self.request_json[param]
        except KeyError:
            raise FnexchangeError(400, 'Bad request: {0} is required'.format(param))
1029555
def execute(self, url, params):
        
        response = requests.get(url, params=params, **self.config.requests_kwargs)

        if 520 <= response.status_code < 530:
            if self.config.handler52x:
                return self.config.handler52x(response, self, url, params)

        response.raise_for_status()

        if not self.config.response_type:
            return response.json()
        else:
            return response.text
705746
def update_params(params, updates):
    ''''''
    params = params.copy() if isinstance(params, dict) else dict()
    params.update(updates)
    return params
1068379
def request_params(additional_params)
      client_params.merge(additional_params).select { |_, v| !v.nil? }
    end
98518
def get_params(self):
        
        params = super().get_params()
        params.update({'beta': self.beta,
                       'knn': self.knn,
                       'decay': self.decay,
                       'bandwidth': self.bandwidth,
                       'distance': self.distance,
                       'thresh': self.thresh,
                       'n_jobs': self.n_jobs})
        return params
614146
def get(self, client_id=None, email_address=None):
        """"""
        params = {"email": email_address or self.email_address}
        response = self._get("/clients/%s/people.json" %
                             (client_id or self.client_id), params=params)
        return json_to_py(response)
368204
def _post_query(self, query, params):
        
        if "apikey" not in params:
            params["apikey"] = self.api_key

        response = requests.post(query, data=params)
        return response.json()
394142
def reply():
    
    params = request.json
    if not params:
        return jsonify({
            "status": "error",
            "error": "Request must be of the application/json type!",
        })

    username = params.get("username")
    message  = params.get("message")
    uservars = params.get("vars", dict())

    # Make sure the required params are present.
    if username is None or message is None:
        return jsonify({
            "status": "error",
            "error": "username and message are required keys",
        })

    # Copy and user vars from the post into RiveScript.
    if type(uservars) is dict:
        for key, value in uservars.items():
            bot.set_uservar(username, key, value)

    # Get a reply from the bot.
    reply = bot.reply(username, message)

    # Get all the user's vars back out of the bot to include in the response.
    uservars = bot.get_uservars(username)

    # Send the response.
    return jsonify({
        "status": "ok",
        "reply": reply,
        "vars": uservars,
    })
210610
def request(self, method, params, session):
        
        session = session or self.client.session
        request = self.create_req(method, params)
        date_time_sent = datetime.datetime.utcnow()
        try:
            response = session.post(
                self.url,
                data=request,
                headers=self.client.request_headers,
                timeout=(self.connect_timeout, self.read_timeout)
            )
        except ConnectionError:
            raise APIError(None, method, params, 'ConnectionError')
        except Exception as e:
            raise APIError(None, method, params, e)
        elapsed_time = (datetime.datetime.utcnow()-date_time_sent).total_seconds()

        check_status_code(response)
        try:
            response_data = response.json()
        except ValueError:
            raise InvalidResponse(response.text)

        if self._error_handler:
            self._error_handler(response_data, method, params)
        return response_data, elapsed_time
117554
def call(self, parameters):
        
        # DEV !
        parameters = {
            key: str(parameters[key]) for key in parameters if parameters[key] is not None
        }
        if self.inventory is not None and "inv" not in parameters:
            parameters["inv"] = self.inventory

        request = requests.get(self.endpoint, params=parameters)
        request.raise_for_status()
        if request.encoding is None:
            request.encoding = "utf-8"
        return request.text
177724
def handle_part(self, params):
        
        for pchannel in params.split(','):
            if pchannel.strip() in self.server.channels:
                # Send message to all clients in all channels user is in, and
                # remove the user from the channels.
                channel = self.server.channels.get(pchannel.strip())
                response = ':%s PART :%s' % (self.client_ident(), pchannel)
                if channel:
                    for client in channel.clients:
                        client.send_queue.append(response)
                channel.clients.remove(self)
                self.channels.pop(pchannel)
            else:
                _vars = self.server.servername, pchannel, pchannel
                response = ':%s 403 %s :%s' % _vars
                self.send_queue.append(response)
1111618
def get_api_params(self):
        
        result = self.params
        if type(result) != dict:
            raise ValueError(
                '{}.params should return dictionary'.format(
                    self.__class__.__name__
                )
            )
        return result
1022232
def request(self, method, params=None):
        
        if params is None:
            params = {}
        if not self.phab_session:
            self.connect()
        url = '%s/api/%s' % (self.host, method)
        params['__conduit__'] = self.phab_session
        req = self.req_session.post(url, data={
            'params': json.dumps(params),
            'output': 'json',
        })
        return json.loads(
            req.content.decode(),
            object_pairs_hook=collections.OrderedDict
        )['result']
514430
def get(self, params, **options):
        """"""
        options = self.client._merge_options({ 'full_payload': True })
        return self.client.get('/events', params, **options)
899000
def _extract_params(self):
        
        # Because in this endpoint we handle both GET
        # and POST request.
        query_dict = (self.request.POST if self.request.method == 'POST'
                      else self.request.GET)

        self.params['client_id'] = query_dict.get('client_id', '')
        self.params['redirect_uri'] = query_dict.get('redirect_uri', '')
        self.params['response_type'] = query_dict.get('response_type', '')
        self.params['scope'] = query_dict.get('scope', '').split()
        self.params['state'] = query_dict.get('state', '')
        self.params['nonce'] = query_dict.get('nonce', '')

        self.params['prompt'] = self._allowed_prompt_params.intersection(
            set(query_dict.get('prompt', '').split()))

        self.params['code_challenge'] = query_dict.get('code_challenge', '')
        self.params['code_challenge_method'] = query_dict.get('code_challenge_method', '')
304891
def get(self, params=None):
        
        return self._call('get', url=self.endpoint, params=params)