GET
 /api/v1/partners/:api_token/credits
 Parameters: none
556570
def credits(params = {})
      request_params = params.merge(access_params)
      request = Requests::Credit::List.new(request_params)
      request.call!
    end
284448
def get_appapi_params(self, prepay_id, timestamp=None, nonce_str=None):
        
        data = {
            'appid': self.appid,
            'partnerid': self.mch_id,
            'prepayid': prepay_id,
            'package': 'Sign=WXPay',
            'timestamp': timestamp or to_text(int(time.time())),
            'noncestr': nonce_str or random_string(32)
        }
        sign = calculate_signature(data, self._client.api_key)
        data['sign'] = sign
        return data
69006
def _get_api_url(self, secure=None, **formatters):
        '''
        '''
        if self.endpoint is None:
            raise NotImplementedError('endpoint must be defined on a subclass')
        if secure is None:
            secure = self.secure
        if secure:
            api_url = POSTMARK_API_URL_SECURE
        else:
            api_url = POSTMARK_API_URL
        url = urljoin(api_url, self.endpoint)
        if formatters:
            url = url.format(**formatters)
        return url
244256
def get_token(self, request):
        
        return stripe.Token.create(
            card={
                "number": request.data["number"],
                "exp_month": request.data["exp_month"],
                "exp_year": request.data["exp_year"],
                "cvc": request.data["cvc"]

            }
        )
1050919
async function getRepos(token, endpoint) {
  logger.info('Autodiscovering GitLab repositories');
  logger.debug('getRepos(token, endpoint)');
  const opts = hostRules.find({ platform: 'gitlab' }, { token, endpoint });
  if (!opts.token) {
    throw new Error('No token found for getRepos');
  }
  hostRules.update({ ...opts, platform: 'gitlab', default: true });
  try {
    const url = `projects?membership=true&per_page=100`;
    const res = await get(url, { paginate: true });
    logger.info(`Discovered ${res.body.length} project(s)`);
    return res.body.map(repo => repo.path_with_namespace);
  } catch (err) {
    logger.error({ err }, `GitLab getRepos error`);
    throw err;
  }
}
866229
def parse_auth_token_from_request(self, auth_header):
        
        if not auth_header:
            raise falcon.HTTPUnauthorized(
                description='Missing Authorization Header')

        try:
            auth_header_prefix, _ = auth_header.split(' ', 1)
        except ValueError:
            raise falcon.HTTPUnauthorized(
                description='Invalid Authorization Header: Missing Scheme or Parameters')

        if auth_header_prefix.lower() != self.auth_header_prefix.lower():
            raise falcon.HTTPUnauthorized(
                description='Invalid Authorization Header: '
                            'Must start with {0}'.format(self.auth_header_prefix))

        return auth_header
1124519
def request_access_token(self, params):
        
        return self.request(self.access_token_url, method="GET", params=params)
903710
def get_credit_note(credit_note_id_or_number)
      request_params = {}

      url  = "#{@xero_url}/CreditNotes/#{CGI.escape(credit_note_id_or_number)}"

      response_xml = http_get(@client, url, request_params)

      parse_response(response_xml, {:request_params => request_params}, {:request_signature => 'GET/CreditNote'})
    end
1086392
def getConsumedCredits(self):
        

        if 'status' in self._response.keys():
            if (self._response['status'] is not None) and ('credits' in self._response['status'].keys()):
                if self._response['status']['credits'] is not None:
                    return self._response['status']['credits']
                else:
                    return '0'
            else:
                print("Not credits field\n")
        else:
            return None
236942
def get_account_funds(self, wallet=None):
        
        return self.make_api_request(
            'Account',
            'getAccountFunds',
            utils.get_kwargs(locals()),
            model=models.AccountFundsResponse,
        )
997076
def get_tokens(self, *, payer_id, credit_card_token_id, start_date, end_date):
        
        payload = {
            "language": self.client.language.value,
            "command": PaymentCommand.GET_TOKENS.value,
            "merchant": {
                "apiLogin": self.client.api_login,
                "apiKey": self.client.api_key
            },
            "creditCardTokenInformation": {
                "payerId": payer_id,
                "creditCardTokenId": credit_card_token_id,
                "startDate": start_date.strftime('%Y-%m-%dT%H:%M:%S'),
                "endDate": end_date.strftime('%Y-%m-%dT%H:%M:%S')
            },
            "test": self.client.is_test
        }
        return self.client._post(self.url, json=payload)
666781
public OvhBalanceInformations credits_GET() throws IOException {
		String qPath = "/freefax/credits";
		StringBuilder sb = path(qPath);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhBalanceInformations.class);
	}
908724
def myPlexAccount(self):
        
        if self._myPlexAccount is None:
            from plexapi.myplex import MyPlexAccount
            self._myPlexAccount = MyPlexAccount(token=self._token)
        return self._myPlexAccount
485152
def get_node(api_url=None, node_name=None, verify=False, cert=list()):
    
    return utils._make_api_request(api_url, '/nodes/{0}'.format(node_name), verify, cert)
102532
def fetch(cls, id, api_key=None, endpoint=None, add_headers=None,
              **kwargs):
        
        if endpoint is None:
            endpoint = cls.get_endpoint()

        inst = cls(api_key=api_key)
        parse_key = cls.sanitize_ep(endpoint).split("/")[-1]
        endpoint = '/'.join((endpoint, id))
        data = cls._parse(inst.request('GET',
                                       endpoint=endpoint,
                                       add_headers=add_headers,
                                       query_params=kwargs),
                          key=parse_key)
        inst._set(data)
        return inst
304891
def get(self, params=None):
        
        return self._call('get', url=self.endpoint, params=params)
99329
def _get_api_content(self):
        """"""

        if GITHUB_TOKEN is not None:
            self.add_params_to_url({
                "access_token": GITHUB_TOKEN
            })

        api_content_response = requests.get(self.api_url)
        self.api_content = json.loads(
            api_content_response.text
        )