🎮 GameService (10 APIs)
API สำหรับจัดการเกม — รายการเกม, เปิดเกม, ผู้ให้บริการเกม, วงล้อ, เกมโปรด
1. เปิดเกม (Open Game)
Authorization
| Type | Key | Value |
|---|---|---|
| Bearer Token | Authorization | Bearer <token> |
Request
POST {{ENDPOINT}}/member-hook/open-game/v2
Body application/json
| Field | ตัวอย่าง | คำอธิบาย |
|---|---|---|
game_id | "pg_slot_001" | ID ของเกม |
member_id | "64a1b2c3d4e5f6a7b8c9d0e1" | ID ของสมาชิก |
Example
Request
curl -X POST '{{ENDPOINT}}/member-hook/open-game/v2' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"game_id": "pg_slot_001",
"member_id": "64a1b2c3d4e5f6a7b8c9d0e1"
}'
Response 200 OK
{
"status": true,
"url": "https://game-provider.com/play?session=xyz789"
}
2. ดึง Game List จาก CDN (CDN Static Game List)
Authorization
ไม่ต้องใช้ (No Auth)
Request
GET {{CDN_URL}}/{provider_name}.json
Path Parameters
| Parameter | ตัวอย่าง | คำอธิบาย |
|---|---|---|
provider_name | pg_soft | ชื่อ provider (lowercase, แทนช่องว่างด้วย _) |
Example
Request
curl -X GET 'https://cdn.example.com/pg_soft.json'
Response 200 OK
[
{
"game_id": "pg_001",
"game_name": "Fortune Tiger",
"image": "https://cdn.example.com/fortune-tiger.webp"
}
]
3. ดึง Provider จาก CDN (CDN Agent Games)
Authorization
ไม่ต้องใช้ (No Auth)
Request
GET https://s3.b9auto.com/AGENT/{app_name}-games.json?v={timestamp}
Path Parameters
| Parameter | ตัวอย่าง | คำอธิบาย |
|---|---|---|
app_name | b9auto | ชื่อ App (lowercase) จาก REACT_APP_NAME |
Example
Request
curl -X GET 'https://s3.b9auto.com/AGENT/b9auto-games.json?v=1705312000000'
Response 200 OK
{
"providers": [
{
"code": "PG",
"name": "PG Soft",
"games": [...]
}
]
}
4. ดึง Game Provider JSON จาก CDN (CDN Provider)
Authorization
ไม่ต้องใช้ (No Auth)
Request
GET https://s3.b9auto.com/{PREFIX}-PROVIDER/provider.json?v={timestamp}
Path Parameters
| Parameter | ตัวอย่าง | คำอธิบาย |
|---|---|---|
PREFIX | B9 | Prefix ของ Agent จาก REACT_APP_PREFIX |
Example
Request
curl -X GET 'https://s3.b9auto.com/B9-PROVIDER/provider.json?v=1705312000000'
Response 200 OK
[
{
"code": "PG",
"name": "PG Soft",
"logo": "https://s3.b9auto.com/provider/pg.png"
}
]
5. ดึง Game List ตาม Provider จาก CDN (CDN Game by Provider)
Authorization
ไม่ต้องใช้ (No Auth)
Request
GET https://s3.b9auto.com/{PREFIX}-GAME/{provider_name}.json?v={timestamp}
Path Parameters
| Parameter | ตัวอย่าง | คำอธิบาย |
|---|---|---|
PREFIX | B9 | Prefix ของ Agent |
provider_name | pg | ชื่อ Provider (lowercase) |
Example
Request
curl -X GET 'https://s3.b9auto.com/B9-GAME/pg.json?v=1705312000000'
Response 200 OK
[
{
"game_id": "pg_001",
"game_name": "Fortune Tiger",
"image": "https://s3.b9auto.com/games/pg/fortune-tiger.webp"
}
]