https://developer.zendesk.com/rest_api/docs/chat/bans#get-ban
508672
def ban_show(self, ban_id, **kwargs):
        ""
        api_path = "/api/v2/bans/{ban_id}"
        api_path = api_path.format(ban_id=ban_id)
        return self.call(api_path, **kwargs)
251214
public function ban($daysToDeleteMessasges = null)
    {
        $deferred = new Deferred();
        $content  = [];

        $url = $this->replaceWithVariables('guilds/:guild_id/bans/:id');

        if (! is_null($daysToDeleteMessasges)) {
            $content['delete-message-days'] = $daysToDeleteMessasges;
        }

        $this->http->put($url, $content)->then(
            function () use ($deferred) {
                $ban = $this->factory->create(Ban::class, [
                    'user'  => $this->user,
                    'guild' => $this->discord->guilds->get('id', $this->guild_id),
                ], true);

                $deferred->resolve($ban);
            },
            \React\Partial\bind_right($this->reject, $deferred)
        );

        return $deferred->promise();
    }
162230
def ban_member_from_group(self, group_jid, peer_jid):
        
        log.info("[+] Requesting ban of user {} from group {}".format(peer_jid, group_jid))
        return self._send_xmpp_element(group_adminship.BanMemberRequest(group_jid, peer_jid))
834530
def _api_query(self, protection=None, path_dict=None, options=None):
        

        if not options:
            options = {}

        if self.api_version not in path_dict:
            raise Exception('method call not available under API version {}'.format(self.api_version))

        request_url = BASE_URL_V2_0 if self.api_version == API_V2_0 else BASE_URL_V1_1
        request_url = request_url.format(path=path_dict[self.api_version])

        nonce = str(int(time.time() * 1000))

        if protection != PROTECTION_PUB:
            request_url = "{0}apikey={1}&nonce={2}&".format(request_url, self.api_key, nonce)

        request_url += urlencode(options)

        try:
            if sys.version_info >= (3, 0) and protection != PROTECTION_PUB:

                apisign = hmac.new(bytearray(self.api_secret, 'ascii'),
                                   bytearray(request_url, 'ascii'),
                                   hashlib.sha512).hexdigest()

            else:

                apisign = hmac.new(self.api_secret.encode(),
                                   request_url.encode(),
                                   hashlib.sha512).hexdigest()

            self.wait()

            return self.dispatch(request_url, apisign)

        except Exception:
            return {
                'success': False,
                'message': 'NO_API_RESPONSE',
                'result': None
            }
648180
def get(path, params = nil, headers = {})
      response = http_client.get(
        path: path,
        query: encode_params(params),
        headers: request_headers(headers)
      )
      if response.status == 200
        parse_response(response)
      else
        handle_error_response(response)
      end
    end
481527
public JSONObject getRule(String objectID, RequestOptions requestOptions) throws AlgoliaException {
    if (objectID == null || objectID.length() == 0) {
      throw new AlgoliaException("Invalid objectID");
    }
    try {
      return client.getRequest("/1/indexes/" + encodedIndexName + "/rules/" + URLEncoder.encode(objectID, "UTF-8"), true, requestOptions);
    } catch (UnsupportedEncodingException e) {
      throw new RuntimeException(e);
    }
  }
951460
def _get(self, q, params=''):
        ''''''
        if (q[-1] == '/'): q = q[:-1]
        headers = {'Content-Type': 'application/json'}
        r = requests.get('{url}{q}?api_key={key}{params}'.format(url=self.url, q=q, key=self.api_key, params=params),
                        headers=headers)
        ret = DotDict(r.json())
        if (not r.ok or ('error' in ret and ret.error == True)):
            raise Exception(r.url, r.reason, r.status_code, r.json())
        return DotDict(r.json())
24780
def get(path, options={}, format=format)
      respond request(:get, path, options, format)
    end
1175537
def get(self, limit=None, offset=None):
        
        return self.connection.get('account/transfer/admin/array', limit=limit, offset=offset)
581409
def get_collection_rules(self, raw=False):
        
        logger.debug("Attemping to download collection rules from %s",
                     self.collection_rules_url)

        net_logger.info("GET %s", self.collection_rules_url)
        try:
            req = self.conn.session.get(
                self.collection_rules_url, headers=({'accept': 'text/plain'}))

            if req.status_code == 200:
                logger.debug("Successfully downloaded collection rules")

                json_response = NamedTemporaryFile()
                json_response.write(req.text.encode('utf-8'))
                json_response.file.flush()
            else:
                logger.error("ERROR: Could not download dynamic configuration")
                logger.error("Debug Info: \nConf status: %s", req.status_code)
                logger.error("Debug Info: \nConf message: %s", req.text)
                return None
        except requests.ConnectionError as e:
            logger.error(
                "ERROR: Could not download dynamic configuration: %s", e)
            return None

        if self.gpg:
            self.get_collection_rules_gpg(json_response)

        self.write_collection_data(self.collection_rules_file, req.text)

        if raw:
            return req.text
        else:
            return json.loads(req.text)
102591
def unban_member_from_group(self, group_jid, peer_jid):
        
        log.info("[+] Requesting un-banning of user {} from the group {}".format(peer_jid, group_jid))
        return self._send_xmpp_element(group_adminship.UnbanRequest(group_jid, peer_jid))
1097872
def _api_get(path, server=None):
    '''
    
    '''
    server = _get_server(server)
    response = requests.get(
            url=_get_url(server['ssl'], server['url'], server['port'], path),
            auth=_get_auth(server['user'], server['password']),
            headers=_get_headers(),
            verify=False
    )
    return _api_response(response)
1033564
def rest_del(self, url, params=None, session=None, verify=True, cert=None):
        
        res = session.delete(url, params=params, verify=verify, cert=cert)
        return res.text, res.status_code
146436
def get(self, request, bot_id, format=None):
        
        return super(MessengerBotList, self).get(request, bot_id, format)
511521
def ban(user, message_days = 0, reason: nil)
      API::Server.ban_user(@bot.token, @id, user.resolve_id, message_days, reason)
    end
304891
def get(self, params=None):
        
        return self._call('get', url=self.endpoint, params=params)
660121
def do_GET(self):
        
        # Example session:
        # in  : GET /wsapi/decrypt?otp=ftftftccccdvvbfcfduvvcubikngtchlubtutucrld HTTP/1.0
        # out : OK counter=0004 low=f585 high=3e use=03
        if self.path.startswith(self.serve_url):
            from_key = self.path[len(self.serve_url):]

            val_res = self.decrypt_yubikey_otp(from_key)

            self.send_response(200)
            self.send_header('Content-type', 'text/html')
            self.end_headers()
            self.wfile.write(val_res)
            self.wfile.write("\n")
        elif self.stats_url and self.path == self.stats_url:
            self.send_response(200)
            self.send_header('Content-type', 'text/html')
            self.end_headers()
            for key in stats:
                self.wfile.write("%s %d\n" % (key, stats[key]))
        else:
            self.log_error("Bad URL '%s' - I'm serving '%s' (responding 403)" % (self.path, self.serve_url))
            self.send_response(403, 'Forbidden')
            self.end_headers()