取得當前遊戲點數
curl --request GET \
--url https://your-api-host/vendor/v2.0/member/balance \
--header 'Authorization: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-api-host/vendor/v2.0/member/balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://your-api-host/vendor/v2.0/member/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-api-host/vendor/v2.0/member/balance"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"channelID": 1,
"account": "player001",
"currency": "CNY",
"balance": 30.25
},
"status": {
"code": "0",
"message": "success",
"datetime": "2022-07-01T10:13:54.920+08:00",
"traceCode": "7cf25e1957cc47fe8e01f1a7c6d504d6"
}
}
會員
取得當前遊戲點數
GET
/
vendor
/
v2.0
/
member
/
balance
取得當前遊戲點數
curl --request GET \
--url https://your-api-host/vendor/v2.0/member/balance \
--header 'Authorization: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-api-host/vendor/v2.0/member/balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://your-api-host/vendor/v2.0/member/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-api-host/vendor/v2.0/member/balance"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"channelID": 1,
"account": "player001",
"currency": "CNY",
"balance": 30.25
},
"status": {
"code": "0",
"message": "success",
"datetime": "2022-07-01T10:13:54.920+08:00",
"traceCode": "7cf25e1957cc47fe8e01f1a7c6d504d6"
}
}
- 查詢指定會員當前遊戲點數。
- 此服務僅支援轉帳錢包會員。
- 此服務有連線次數限制,限制為每秒限制呼叫 500 次 (500/s)。
請求參數
number
required
參與簽章
渠道編號 (若無渠道,請帶入1)
string
required
參與簽章
會員帳號 (允許字元:
a-z A-Z 0-9 _-)string
required
參與簽章
幣別 (請洽詢我方商務)
回應
成功(HTTP 狀態碼固定為 200,請以status.code 判斷結果)
object
{
"data": {
"channelID": 1,
"account": "player001",
"currency": "CNY",
"balance": 30.25
},
"status": {
"code": "0",
"message": "success",
"datetime": "2022-07-01T10:13:54.920+08:00",
"traceCode": "7cf25e1957cc47fe8e01f1a7c6d504d6"
}
}