From ba09abbe6a8d0c1f3a54c8c7426eda7b930e1447 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Fri, 25 Aug 2023 23:41:13 +0300 Subject: docs: profile improvement swagger (#51) Former-commit-id: ff35be478c4f29c611c40fa34ca5d134e970cc16 --- docs/docs.go | 137 +++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 119 insertions(+), 18 deletions(-) (limited to 'docs/docs.go') diff --git a/docs/docs.go b/docs/docs.go index df01379..d0c78ac 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1158,6 +1158,68 @@ const docTemplate = `{ } } }, + "controllers.ProfileRankings": { + "type": "object", + "properties": { + "cooperative": { + "$ref": "#/definitions/controllers.ProfileRankingsDetails" + }, + "overall": { + "$ref": "#/definitions/controllers.ProfileRankingsDetails" + }, + "singleplayer": { + "$ref": "#/definitions/controllers.ProfileRankingsDetails" + } + } + }, + "controllers.ProfileRankingsDetails": { + "type": "object", + "properties": { + "completion_count": { + "type": "integer" + }, + "completion_total": { + "type": "integer" + }, + "rank": { + "type": "integer" + } + } + }, + "controllers.ProfileRecords": { + "type": "object", + "properties": { + "portal2_cooperative": { + "type": "array", + "items": { + "$ref": "#/definitions/controllers.ProfileRecordsDetails" + } + }, + "portal2_singleplayer": { + "type": "array", + "items": { + "$ref": "#/definitions/controllers.ProfileRecordsDetails" + } + } + } + }, + "controllers.ProfileRecordsDetails": { + "type": "object", + "properties": { + "map_id": { + "type": "integer" + }, + "map_name": { + "type": "string" + }, + "scores": { + "type": "array", + "items": { + "$ref": "#/definitions/controllers.ProfileScores" + } + } + } + }, "controllers.ProfileResponse": { "type": "object", "properties": { @@ -1167,26 +1229,46 @@ const docTemplate = `{ "country_code": { "type": "string" }, + "links": { + "$ref": "#/definitions/models.Links" + }, "profile": { "type": "boolean" }, - "scores_mp": { - "type": "array", - "items": { - "$ref": "#/definitions/controllers.ScoreResponse" - } + "rankings": { + "$ref": "#/definitions/controllers.ProfileRankings" + }, + "records": { + "$ref": "#/definitions/controllers.ProfileRecords" }, - "scores_sp": { + "steam_id": { + "type": "string" + }, + "titles": { "type": "array", "items": { - "$ref": "#/definitions/controllers.ScoreResponse" + "$ref": "#/definitions/models.Title" } }, - "steam_id": { + "user_name": { + "type": "string" + } + } + }, + "controllers.ProfileScores": { + "type": "object", + "properties": { + "date": { "type": "string" }, - "user_name": { + "demo_id": { "type": "string" + }, + "score_count": { + "type": "integer" + }, + "score_time": { + "type": "integer" } } }, @@ -1218,15 +1300,6 @@ const docTemplate = `{ } } }, - "controllers.ScoreResponse": { - "type": "object", - "properties": { - "map_id": { - "type": "integer" - }, - "records": {} - } - }, "controllers.SearchResponse": { "type": "object", "properties": { @@ -1280,6 +1353,23 @@ const docTemplate = `{ } } }, + "models.Links": { + "type": "object", + "properties": { + "p2sr": { + "type": "string" + }, + "stream": { + "type": "string" + }, + "twitch": { + "type": "string" + }, + "youtube": { + "type": "string" + } + } + }, "models.Map": { "type": "object", "properties": { @@ -1380,6 +1470,17 @@ const docTemplate = `{ } } }, + "models.Title": { + "type": "object", + "properties": { + "color": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, "models.UserRanking": { "type": "object", "properties": { -- cgit v1.2.3