取得當前遊玩數
curl --request GET \
--url https://your-api-host/vendor/v2.0/member/gamingCount \
--header 'Authorization: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-api-host/vendor/v2.0/member/gamingCount",
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/gamingCount', 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/gamingCount"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"list": [
{
"account": "aaa123",
"token": "0feb26b6683147c8900ca17c43ecd5fb",
"gameID": 63
}
],
"gameCount": 1,
"memberCount": 1
},
"status": {
"code": "0",
"message": "success",
"datetime": "2022-10-14T17:37:59.184+08:00",
"traceCode": "2888018b99504bc5945e15f51b7e3e0c"
}
}
會員
取得當前遊玩數
GET
/
vendor
/
v2.0
/
member
/
gamingCount
取得當前遊玩數
curl --request GET \
--url https://your-api-host/vendor/v2.0/member/gamingCount \
--header 'Authorization: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-api-host/vendor/v2.0/member/gamingCount",
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/gamingCount', 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/gamingCount"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"list": [
{
"account": "aaa123",
"token": "0feb26b6683147c8900ca17c43ecd5fb",
"gameID": 63
}
],
"gameCount": 1,
"memberCount": 1
},
"status": {
"code": "0",
"message": "success",
"datetime": "2022-10-14T17:37:59.184+08:00",
"traceCode": "2888018b99504bc5945e15f51b7e3e0c"
}
}
- 查詢會員在線遊玩數。
請求參數
number
必填
參與簽章
渠道編號 (無渠道帶入1)
string
必填
參與簽章
會員帳號 (非特定會員請帶入空值)
回應
成功(HTTP 狀態碼固定為 200,請以status.code 判斷結果)
object
{
"data": {
"list": [
{
"account": "aaa123",
"token": "0feb26b6683147c8900ca17c43ecd5fb",
"gameID": 63
}
],
"gameCount": 1,
"memberCount": 1
},
"status": {
"code": "0",
"message": "success",
"datetime": "2022-10-14T17:37:59.184+08:00",
"traceCode": "2888018b99504bc5945e15f51b7e3e0c"
}
}