# Get Live Games Count GET /api/v1/player/live-games-count/ Get the total count of games currently live. Optionally filter by quest. Reference: https://docs.aisquare.studio/api-reference/ai-square-studio-api/player-statistics/get-live-games-count ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: AISquare Studio API version: 1.0.0 paths: /api/v1/player/live-games-count/: get: operationId: get-live-games-count summary: Get Live Games Count description: Get the total count of games currently live. Optionally filter by quest. tags: - subpackage_playerStatistics parameters: - name: quest_id in: query description: Quest UID to filter live games by a specific quest required: false schema: type: string responses: '200': description: Live games count retrieved successfully content: application/json: schema: $ref: '#/components/schemas/LiveGamesCount' '400': description: Invalid quest_id provided content: application/json: schema: description: Any type '404': description: Quest not found content: application/json: schema: description: Any type components: schemas: LiveGamesCount: type: object properties: total_count: type: integer filters_applied: type: object additionalProperties: description: Any type quest_info: type: object additionalProperties: description: Any type required: - total_count - filters_applied - quest_info description: Serializer for live games count response title: LiveGamesCount ``` ## SDK Code Examples ```python Success Response import requests url = "https://api.example.com/api/v1/player/live-games-count/" response = requests.get(url) print(response.json()) ``` ```javascript Success Response const url = 'https://api.example.com/api/v1/player/live-games-count/'; const options = {method: 'GET'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Success Response package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.example.com/api/v1/player/live-games-count/" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Success Response require 'uri' require 'net/http' url = URI("https://api.example.com/api/v1/player/live-games-count/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```java Success Response import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.example.com/api/v1/player/live-games-count/") .asString(); ``` ```php Success Response request('GET', 'https://api.example.com/api/v1/player/live-games-count/'); echo $response->getBody(); ``` ```csharp Success Response using RestSharp; var client = new RestClient("https://api.example.com/api/v1/player/live-games-count/"); var request = new RestRequest(Method.GET); IRestResponse response = client.Execute(request); ``` ```swift Success Response import Foundation let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/api/v1/player/live-games-count/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```