此 API 请求允许运营商接收针对其特定前端启用的游戏的完整列表。 如果未启用任何游戏,则响应将返回为“空”。
GetGames() 请求
类型 | 输入 |
---|
HTTP 方法 | POST |
API URL | https://<API_BASE_URL>/games/get-games/ |
标头 | "Content-Type": "application/json" |
POST 参数 | json 对象 e.g.:
{ "api_key": "1pghjl4v5apt2bks" } |
参数 | 类型 | 描述 |
---|
api_key | 字符串 | 分配给每个前端的API Key |
GetGames() 响应 + 示例
{ "result": { "games": { "slots": [ { "game-fruityfeast": { "game_id": 4, "game_name": "fruityfeast", "game_title": "Fruity Feast", "category": "slots", "supplier": "test_games", "story": "Reap the Fruity Rewards", "logos": [ { "url": "https://test-gaming.com/images/lobby/200x150/ fruityfeast.png", "width": "200", "height": "150" }, { "url": "https://test-gaming.com/images/lobby/400x300/ fruityfeast.png", "width": "400", "height": "300" } ], "launch_params": [ { "width": 800, "height": 600, "resizable": true, "scrollbars": false, "type": "browser", "launch_type": "new_window", "window_title": "%full_site_code%_%category%", "channel": "desktop", "launch_url": "https://testgames.testsite.com/game_launcher.php? session_id=%session_id%&channel=desktop&full_site_code=PFMNGOP&language=en& game_name=%game_i d%&category=slots&amount_ type=%amount_type%&reality_check=%reality_check%" }, { "type": "browser", "launch_type": "same_window", "channel": "mobile", "launch_url": "https://testgames.testsite.com/game_launcher.php? session_id=%session_id%&channel=mobile& full_site_ code=PFMNGOP&language=en&game_name=%game_id%& category=slots&amount_type=%amount_type%&reality_check=%reality_check%" } ], "amount_types": [ { "id": "cash", "value": 1, "name": "Play" }, { "id": "bonus", "value": "2", "name": "Play" } ] } }, { "game2": "game_details" } ], "table_games": [], "scratch_cards": [] } } }
参数 | 类型 | 描述 |
---|
result | JSON 对象 | Key值将显示为字典。 |
games | JSON 对象 | 作为字典中的Key显示 |
game_type | JSON 对象 | 每个游戏里面都有一个列表,以字典的形式包含游戏特定的细节。 |
GetGames() 错误响应
任何响应都将以 JSON 格式提供。 显示类型:字典。 该字典包含两个Key名“error”和“error_details”。 如果发生错误,error Key将包含值 1,而 error_details Key将包含详细说明该特定错误的信息。 将根据每个错误设置任何显示的消息。
{ "error": 1, "error_detail": { "id": 1001, "code": "INVALID_API_KEY", "message": "Invalid API key." } }