From 96f55dba15bcbba4e6d8f14035ecfd20ebcea8a8 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Mon, 27 Oct 2025 22:12:31 +0300 Subject: feat/backend: timeline stats endpoint --- backend/docs/swagger.json | 148 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 105 insertions(+), 43 deletions(-) (limited to 'backend/docs/swagger.json') diff --git a/backend/docs/swagger.json b/backend/docs/swagger.json index 6c10cfc..981d017 100644 --- a/backend/docs/swagger.json +++ b/backend/docs/swagger.json @@ -244,37 +244,6 @@ } } }, - "/logs/score": { - "get": { - "description": "Get score logs of every player.", - "produces": [ - "application/json" - ], - "tags": [ - "logs" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "allOf": [ - { - "$ref": "#/definitions/models.Response" - }, - { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/handlers.ScoreLogsResponse" - } - } - } - ] - } - } - } - } - }, "/maps/{mapid}/discussions": { "get": { "description": "Get map discussions with specified map id.", @@ -1214,6 +1183,68 @@ } } }, + "/stats/scores": { + "get": { + "description": "Get score logs of every player.", + "produces": [ + "application/json" + ], + "tags": [ + "stats" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/models.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/handlers.ScoresResponse" + } + } + } + ] + } + } + } + } + }, + "/stats/timeline": { + "get": { + "description": "Get the history of portal count world records over time.", + "produces": [ + "application/json" + ], + "tags": [ + "stats" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/models.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/handlers.TimelineResponse" + } + } + } + ] + } + } + } + } + }, "/token": { "get": { "description": "Gets the token cookie value from the user.", @@ -1768,18 +1799,7 @@ } } }, - "handlers.ScoreLogsResponse": { - "type": "object", - "properties": { - "scores": { - "type": "array", - "items": { - "$ref": "#/definitions/handlers.ScoreLogsResponseDetails" - } - } - } - }, - "handlers.ScoreLogsResponseDetails": { + "handlers.ScoresDetails": { "type": "object", "properties": { "date": { @@ -1805,6 +1825,17 @@ } } }, + "handlers.ScoresResponse": { + "type": "object", + "properties": { + "scores": { + "type": "array", + "items": { + "$ref": "#/definitions/handlers.ScoresDetails" + } + } + } + }, "handlers.SearchResponse": { "type": "object", "properties": { @@ -1854,6 +1885,34 @@ } } }, + "handlers.TimelinePoint": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "date": { + "type": "string" + } + } + }, + "handlers.TimelineResponse": { + "type": "object", + "properties": { + "timeline_multiplayer": { + "type": "array", + "items": { + "$ref": "#/definitions/handlers.TimelinePoint" + } + }, + "timeline_singleplayer": { + "type": "array", + "items": { + "$ref": "#/definitions/handlers.TimelinePoint" + } + } + } + }, "models.Category": { "type": "object", "properties": { @@ -1939,6 +1998,9 @@ "chapter_name": { "type": "string" }, + "difficulty": { + "type": "integer" + }, "game_name": { "type": "string" }, -- cgit v1.2.3