删除客服账号
        详情请参考
        http://mp.weixin.qq.com/wiki/1/70a29afed17f56d537c833f89be979c9.html

        :param account: 完整客服账号，格式为：账号前缀@公众号微信号
        :return: 返回的 JSON 数据包
196449
def delete_account(self, account):
        
        params_data = [
            'access_token={0}'.format(quote(self.access_token)),
            'kf_account={0}'.format(quote(to_binary(account), safe=b'/@')),
        ]
        params = '&'.join(params_data)
        return self._get(
            'https://api.weixin.qq.com/customservice/kfaccount/del',
            params=params
        )
540514
def ToJson(self):
        
        return {
            'assetId': self.AssetId.To0xString(),
            'assetType': self.AssetType,
            'name': self.GetName(),
            'amount': self.Amount.value,
            'available': self.Available.value,
            'precision': self.Precision,
            'fee': self.Fee.value,
            'address': self.FeeAddress.ToString(),
            'owner': self.Owner.ToString(),
            'admin': Crypto.ToAddress(self.Admin),
            'issuer': Crypto.ToAddress(self.Issuer),
            'expiration': self.Expiration,
            'is_frozen': self.IsFrozen
        }
1048269
def user_info(self):
        
        account_uri = self.uri.split('/api/v1')[0] + '/account'
        req = self.request(account_uri)
        account_info = req.get()
        user_data = HTMLParser(account_info.content)
        return user_data
1194397
def account_info(self):
        
        response = self._post(self.apiurl + "/v2/account/info", data={'apikey': self.apikey})

        return self._raise_or_extract(response)
4389
def tempo_account_export_accounts(self):
        
        headers = self.form_token_headers
        url = 'rest/tempo-accounts/1/export'
        return self.get(url, headers=headers, not_json_response=True)
781380
def to_json(self):
        
        return {
            'resourceType': self.resource.resource_type_id,
            'resourceId': self.id,
            'accountId': self.resource.account_id,
            'account': self.account,
            'location': self.resource.location,
            'properties': {to_camelcase(prop.name): prop.value for prop in self.resource.properties},
            'tags': [{'key': t.key, 'value': t.value} for t in self.resource.tags]
        }
964478
def get_account_details(self, account):
        
        result = self.get_user(account.username)
        if result is None:
            result = {}
        return result
85295
def get_info(self, account, params={}):
        
        res = self.invoke(zconstant.NS_ZIMBRA_ADMIN_URL,
                          sconstant.GetInfoRequest,
                          params)

        return res
490174
def query_orders(self, accounts, status='filled'):
        
        try:
            data = self.call("orders", {'client': accounts, 'status': status})

            if data is not None:
                orders = data.get('dataTable', False)

                order_headers = orders['columns']
                if ('成交状态' in order_headers
                        or '状态说明' in order_headers) and ('备注' in order_headers):
                    order_headers[order_headers.index('备注')] = '废弃'

                order_headers = [cn_en_compare[item] for item in order_headers]
                order_all = pd.DataFrame(
                    orders['rows'],
                    columns=order_headers
                ).assign(account_cookie=accounts)

                order_all.towards = order_all.towards.apply(
                    lambda x: trade_towards_cn_en[x]
                )
                if 'order_time' in order_headers:
                    # 这是order_status
                    order_all['status'] = order_all.status.apply(
                        lambda x: order_status_cn_en[x]
                    )
                    if 'order_date' not in order_headers:
                        order_all.order_time = order_all.order_time.apply(
                            lambda x: QA_util_get_order_datetime(
                                dt='{} {}'.format(datetime.date.today(),
                                                  x)
                            )
                        )
                    else:
                        order_all = order_all.assign(
                            order_time=order_all.order_date
                            .apply(QA_util_date_int2str) + ' ' +
                            order_all.order_time
                        )

                if 'trade_time' in order_headers:

                    order_all.trade_time = order_all.trade_time.apply(
                        lambda x: '{} {}'.format(datetime.date.today(),
                                                 x)
                    )

                if status is 'filled':
                    return order_all.loc[:,
                                         self.dealstatus_headers].set_index(
                                             ['account_cookie',
                                              'realorder_id']
                    ).sort_index()
                else:
                    return order_all.loc[:,
                                         self.orderstatus_headers].set_index(
                                             ['account_cookie',
                                              'realorder_id']
                    ).sort_index()
            else:
                print('response is None')
                return False
        except Exception as e:
            print(e)
            return False
867953
public AccountInfo getAccountInfo() throws Exception {

        final JSONObject jsonObject = toJSONObject(client.get(getUri(), null));


        return new AccountInfo(client, jsonObject);
    }
519457
def _get_account_number(self, token, uuid):
        """"""
        # Data
        data = {"accessToken": token,
                "uuid": uuid}
        # Http request
        try:
            raw_res = yield from self._session.post(ACCOUNT_URL,
                                                    data=data,
                                                    headers=self._headers,
                                                    timeout=self._timeout)
        except OSError:
            raise PyFidoError("Can not get account number")
        # Load answer as json
        try:
            json_content = yield from raw_res.json()
            account_number = json_content\
                            .get('getCustomerAccounts', {})\
                            .get('accounts', [{}])[0]\
                            .get('accountNumber')
        except (OSError, ValueError):
            raise PyFidoError("Bad json getting account number")
        # Check collected data
        if account_number is None:
            raise PyFidoError("Can not get account number")

        return account_number
219434
def get_account_details(self, account):
        
        _form = mechanize.HTMLForm(self.SEARCH_MEMBERS_URL, method="POST")
        _form.new_control('text', 'username', {'value': account})
        _form.new_control('text', '_', {'value': ''})

        try:
            r = self.post_url(self.SEARCH_MEMBERS_URL, form=_form)
        except AuthRequiredException:
            self._auth()
            r = self.post_url(self.SEARCH_MEMBERS_URL, form=_form)

        if r:
            # single quoted json parameters are not valid so convert
            # them into double quoted parameters
            _decoded = json.loads(r.replace("'", '"'))
            # we have a double array result so retrieve only what's
            # essential
            if _decoded[0]:
                return _decoded[0][0]

        raise InvalidAccountException
617313
def get_sub_accounts_of_account(self, account_id, recursive=None):
        
        path = {}
        data = {}
        params = {}

        # REQUIRED - PATH - account_id
        """ID"""
        path["account_id"] = account_id

        # OPTIONAL - recursive
        """If true, the entire account tree underneath
        this account will be returned (though still paginated). If false, only
        direct sub-accounts of this account will be returned. Defaults to false."""
        if recursive is not None:
            params["recursive"] = recursive

        self.logger.debug("GET /api/v1/accounts/{account_id}/sub_accounts with query params: {params} and form data: {data}".format(params=params, data=data, **path))
        return self.generic_request("GET", "/api/v1/accounts/{account_id}/sub_accounts".format(**path), data=data, params=params, all_pages=True)
1231108
public char[] loadPassword(String account) {
		byte[] pwBytes = loadPassword0(account.getBytes(UTF_8));
		if (pwBytes == null) {
			return null;
		} else {
			CharBuffer pwBuf = UTF_8.decode(ByteBuffer.wrap(pwBytes));
			char[] pw = new char[pwBuf.remaining()];
			pwBuf.get(pw);
			Arrays.fill(pwBytes, (byte) 0x00);
			Arrays.fill(pwBuf.array(), (char) 0x00);
			return pw;
		}
	}
316925
def by_account(self, region, encrypted_account_id):
        
        url, query = SummonerApiV4Urls.by_account(
            region=region, encrypted_account_id=encrypted_account_id
        )
        return self._raw_request(self.by_account.__name__, region, url, query)
1373255
def account(self):
        
        j, _ = self.request('GET', '')
        if 'login' in j and self.login == 'my':
            self.login = j['login']
        return j
40493
def list(self):
        
        response = self.client._make_request('/accounts')
        response = response.json()
        return self.client._list_response(response)