ຂໍ້ມູນຍອດເງິນ
API ນີ້ໃຊ້ເພື່ອດຶງຂໍ້ມູນຍອດເງິນປະຈຸບັນຂອງບັນຊີທີ່ລະບຸ.
ເສັ້ນທາງ (Endpoint)
GET https://open-api.q23.co/termgame/{identifier}/get-balanceແທນທີ່ {identifier} ດ້ວຍລະຫັດຂອງທ່ານ.
Example:
https://open-api.q23.co/termgame/therdy/get-balance
https://open-api.q23.co/termgame/q23/get-balanceHeader
| ຊື່ Header | ຈຳເປັນ | ຄຳອະທິບາຍ |
|---|---|---|
| agent-token | ✅ | ລະຫັດຜ່ານສຳລັບການຢືນຢັນ |
ຕົວຢ່າງ:
agent-token: agent_passwordຄຳຕອບ (Response)
ຖ້າສຳເລັດ ຈະໄດ້ຮັບ JSON ດັ່ງນີ້:
json
{
"name": "shop.therdy.co",
"balance": 9762001
}ລາຍລະອຽດຄ່າທີ່ຕອບກັບ
| ຊື່ຄ່າ | ປະເພດ | ຄຳອະທິບາຍ |
|---|---|---|
| name | string | ຊື່ບັນຊີ |
| balance | number | ຍອດເງິນປະຈຸບັນ |
ຕົວຢ່າງການໃຊ້ງານ
cURL
bash
curl -X GET \
'https://open-api.q23.co/termgame/your_identifier_here/get-balance' \
-H 'agent-token: agent_password'JavaScript
javascript
fetch("https://open-api.q23.co/termgame/your_identifier_here/get-balance", {
method: "GET",
headers: {
"agent-token": "agent_password",
},
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));