{ "swagger": "2.0", "info": { "description": "Backend API endpoints for Least Portals Hub.", "title": "Least Portals Hub", "contact": {}, "license": { "name": "GNU Affero General Public License, Version 3", "url": "https://www.gnu.org/licenses/agpl-3.0.html" }, "version": "1.0" }, "host": "lp.ardapektezol.com", "basePath": "/api/v1", "paths": { "/chapters/{chapterid}": { "get": { "description": "Get maps from the specified chapter id.", "produces": [ "application/json" ], "tags": [ "games \u0026 chapters" ], "parameters": [ { "type": "integer", "description": "Chapter ID", "name": "chapterid", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.ChapterMapsResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/models.Response" } } } } }, "/demos": { "get": { "description": "Get demo with specified demo uuid.", "consumes": [ "application/json" ], "produces": [ "application/octet-stream" ], "tags": [ "demo" ], "parameters": [ { "type": "string", "description": "Demo UUID", "name": "uuid", "in": "query", "required": true } ], "responses": { "200": { "description": "Demo File", "schema": { "type": "file" } } } } }, "/games": { "get": { "description": "Get games from the leaderboards.", "produces": [ "application/json" ], "tags": [ "games \u0026 chapters" ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/models.Game" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/models.Response" } } } } }, "/games/{gameid}": { "get": { "description": "Get chapters from the specified game id.", "produces": [ "application/json" ], "tags": [ "games \u0026 chapters" ], "parameters": [ { "type": "integer", "description": "Game ID", "name": "gameid", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.ChaptersResponse" } } } ] } } } } }, "/games/{gameid}/maps": { "get": { "description": "Get maps from the specified game id.", "produces": [ "application/json" ], "tags": [ "games \u0026 chapters" ], "parameters": [ { "type": "integer", "description": "Game ID", "name": "gameid", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.ChaptersResponse" } } } ] } } } } }, "/login": { "get": { "description": "Get (redirect) login page for Steam auth.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "login" ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.LoginResponse" } } } ] } } } } }, "/logs/mod": { "get": { "description": "Get mod logs.", "produces": [ "application/json" ], "tags": [ "logs" ], "parameters": [ { "type": "string", "description": "JWT Token", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.LogsResponse" } } } ] } } } } }, "/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.", "produces": [ "application/json" ], "tags": [ "maps / discussions" ], "parameters": [ { "type": "integer", "description": "Map ID", "name": "mapid", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.MapDiscussionsResponse" } } } ] } } } }, "post": { "description": "Create map discussion with specified map id.", "produces": [ "application/json" ], "tags": [ "maps / discussions" ], "parameters": [ { "type": "string", "description": "JWT Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Map ID", "name": "mapid", "in": "path", "required": true }, { "description": "Body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateMapDiscussionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.CreateMapDiscussionRequest" } } } ] } } } } }, "/maps/{mapid}/discussions/{discussionid}": { "get": { "description": "Get map discussion with specified map and discussion id.", "produces": [ "application/json" ], "tags": [ "maps / discussions" ], "parameters": [ { "type": "integer", "description": "Map ID", "name": "mapid", "in": "path", "required": true }, { "type": "integer", "description": "Discussion ID", "name": "discussionid", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.MapDiscussionResponse" } } } ] } } } }, "put": { "description": "Edit map discussion with specified map id.", "produces": [ "application/json" ], "tags": [ "maps / discussions" ], "parameters": [ { "type": "string", "description": "JWT Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Map ID", "name": "mapid", "in": "path", "required": true }, { "type": "integer", "description": "Discussion ID", "name": "discussionid", "in": "path", "required": true }, { "description": "Body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.EditMapDiscussionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.EditMapDiscussionRequest" } } } ] } } } }, "post": { "description": "Create map discussion comment with specified map id.", "produces": [ "application/json" ], "tags": [ "maps / discussions" ], "parameters": [ { "type": "string", "description": "JWT Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Map ID", "name": "mapid", "in": "path", "required": true }, { "type": "integer", "description": "Discussion ID", "name": "discussionid", "in": "path", "required": true }, { "description": "Body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateMapDiscussionCommentRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.CreateMapDiscussionCommentRequest" } } } ] } } } }, "delete": { "description": "Delete map discussion with specified map id.", "produces": [ "application/json" ], "tags": [ "maps / discussions" ], "parameters": [ { "type": "string", "description": "JWT Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Map ID", "name": "mapid", "in": "path", "required": true }, { "type": "integer", "description": "Discussion ID", "name": "discussionid", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.Response" } } } } }, "/maps/{mapid}/image": { "put": { "description": "Edit map image with specified map id.", "produces": [ "application/json" ], "tags": [ "maps / summary" ], "parameters": [ { "type": "string", "description": "JWT Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Map ID", "name": "mapid", "in": "path", "required": true }, { "description": "Body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.EditMapImageRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.EditMapImageRequest" } } } ] } } } } }, "/maps/{mapid}/leaderboards": { "get": { "description": "Get map leaderboards with specified id.", "produces": [ "application/json" ], "tags": [ "maps / leaderboards" ], "parameters": [ { "type": "integer", "description": "Map ID", "name": "mapid", "in": "path", "required": true }, { "type": "integer", "description": "Page Number (default: 1)", "name": "page", "in": "query" }, { "type": "integer", "description": "Number of Records Per Page (default: 20)", "name": "pageSize", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.MapLeaderboardsResponse" } } } ] } } } } }, "/maps/{mapid}/record": { "post": { "description": "Post record with demo of a specific map.", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "maps / leaderboards" ], "parameters": [ { "type": "integer", "description": "Map ID", "name": "mapid", "in": "path", "required": true }, { "type": "string", "description": "JWT Token", "name": "Authorization", "in": "header", "required": true }, { "type": "file", "description": "Host Demo", "name": "host_demo", "in": "formData", "required": true }, { "type": "file", "description": "Partner Demo", "name": "partner_demo", "in": "formData" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.RecordResponse" } } } ] } } } } }, "/maps/{mapid}/record/{recordid}": { "delete": { "description": "Delete record with specified map and record id.", "produces": [ "application/json" ], "tags": [ "maps / leaderboards" ], "parameters": [ { "type": "integer", "description": "Map ID", "name": "mapid", "in": "path", "required": true }, { "type": "integer", "description": "Record ID", "name": "recordid", "in": "path", "required": true }, { "type": "string", "description": "JWT Token", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.Response" } } } } }, "/maps/{mapid}/summary": { "get": { "description": "Get map summary with specified id.", "produces": [ "application/json" ], "tags": [ "maps / summary" ], "parameters": [ { "type": "integer", "description": "Map ID", "name": "mapid", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.MapSummaryResponse" } } } ] } } } }, "put": { "description": "Edit map summary with specified map id.", "produces": [ "application/json" ], "tags": [ "maps / summary" ], "parameters": [ { "type": "string", "description": "JWT Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Map ID", "name": "mapid", "in": "path", "required": true }, { "description": "Body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.EditMapSummaryRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.EditMapSummaryRequest" } } } ] } } } }, "post": { "description": "Create map summary with specified map id.", "produces": [ "application/json" ], "tags": [ "maps / summary" ], "parameters": [ { "type": "string", "description": "JWT Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Map ID", "name": "mapid", "in": "path", "required": true }, { "description": "Body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateMapSummaryRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.CreateMapSummaryRequest" } } } ] } } } }, "delete": { "description": "Delete map summary with specified map id.", "produces": [ "application/json" ], "tags": [ "maps / summary" ], "parameters": [ { "type": "string", "description": "JWT Token", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "Map ID", "name": "mapid", "in": "path", "required": true }, { "description": "Body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.DeleteMapSummaryRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.DeleteMapSummaryRequest" } } } ] } } } } }, "/profile": { "get": { "description": "Get profile page of session user.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "parameters": [ { "type": "string", "description": "JWT Token", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.ProfileResponse" } } } ] } } } }, "put": { "description": "Update country code of session user.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "parameters": [ { "type": "string", "description": "JWT Token", "name": "Authorization", "in": "header", "required": true }, { "type": "string", "description": "Country Code [XX]", "name": "country_code", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.Response" } } } }, "post": { "description": "Update profile page of session user.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "parameters": [ { "type": "string", "description": "JWT Token", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.ProfileResponse" } } } ] } } } } }, "/rankings/lphub": { "get": { "description": "Get rankings of every player from LPHUB.", "produces": [ "application/json" ], "tags": [ "rankings" ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.RankingsResponse" } } } ] } } } } }, "/rankings/steam": { "get": { "description": "Get rankings of every player from Steam.", "produces": [ "application/json" ], "tags": [ "rankings" ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.RankingsSteamResponse" } } } ] } } } } }, "/search": { "get": { "description": "Get all user and map data matching to the query.", "produces": [ "application/json" ], "tags": [ "search" ], "parameters": [ { "type": "string", "description": "Search user or map name.", "name": "q", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.SearchResponse" } } } ] } } } } }, "/token": { "get": { "description": "Gets the token cookie value from the user.", "produces": [ "application/json" ], "tags": [ "auth" ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.LoginResponse" } } } ] } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/models.Response" } } } }, "delete": { "description": "Deletes the token cookie from the user.", "produces": [ "application/json" ], "tags": [ "auth" ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.LoginResponse" } } } ] } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/models.Response" } } } } }, "/users/{userid}": { "get": { "description": "Get profile page of another user.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "parameters": [ { "type": "integer", "description": "User ID", "name": "userid", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/models.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.ProfileResponse" } } } ] } } } } } }, "definitions": { "handlers.ChapterMapsResponse": { "type": "object", "properties": { "chapter": { "$ref": "#/definitions/models.Chapter" }, "maps": { "type": "array", "items": { "$ref": "#/definitions/models.MapSelect" } } } }, "handlers.ChaptersResponse": { "type": "object", "properties": { "chapters": { "type": "array", "items": { "$ref": "#/definitions/models.Chapter" } }, "game": { "$ref": "#/definitions/models.Game" } } }, "handlers.CreateMapDiscussionCommentRequest": { "type": "object", "required": [ "comment" ], "properties": { "comment": { "type": "string" } } }, "handlers.CreateMapDiscussionRequest": { "type": "object", "required": [ "content", "title" ], "properties": { "content": { "type": "string" }, "title": { "type": "string" } } }, "handlers.CreateMapSummaryRequest": { "type": "object", "required": [ "category_id", "description", "record_date", "score_count", "user_name" ], "properties": { "category_id": { "type": "integer" }, "description": { "type": "string" }, "record_date": { "type": "string" }, "score_count": { "type": "integer" }, "showcase": { "type": "string" }, "user_name": { "type": "string" } } }, "handlers.DeleteMapSummaryRequest": { "type": "object", "required": [ "route_id" ], "properties": { "route_id": { "type": "integer" } } }, "handlers.EditMapDiscussionRequest": { "type": "object", "required": [ "content", "title" ], "properties": { "content": { "type": "string" }, "title": { "type": "string" } } }, "handlers.EditMapImageRequest": { "type": "object", "required": [ "image" ], "properties": { "image": { "type": "string" } } }, "handlers.EditMapSummaryRequest": { "type": "object", "required": [ "description", "record_date", "route_id", "score_count", "user_name" ], "properties": { "description": { "type": "string" }, "record_date": { "type": "string" }, "route_id": { "type": "integer" }, "score_count": { "type": "integer" }, "showcase": { "type": "string" }, "user_name": { "type": "string" } } }, "handlers.LoginResponse": { "type": "object", "properties": { "token": { "type": "string" } } }, "handlers.LogsResponse": { "type": "object", "properties": { "logs": { "type": "array", "items": { "$ref": "#/definitions/handlers.LogsResponseDetails" } } } }, "handlers.LogsResponseDetails": { "type": "object", "properties": { "date": { "type": "string" }, "detail": { "type": "string" }, "message": { "type": "string" }, "user": { "$ref": "#/definitions/models.UserShort" } } }, "handlers.MapDiscussion": { "type": "object", "properties": { "comments": { "type": "array", "items": { "$ref": "#/definitions/handlers.MapDiscussionComment" } }, "content": { "type": "string" }, "created_at": { "description": "Upvotes int `json:\"upvotes\"`", "type": "string" }, "creator": { "$ref": "#/definitions/models.UserShortWithAvatar" }, "id": { "type": "integer" }, "title": { "type": "string" }, "updated_at": { "type": "string" } } }, "handlers.MapDiscussionComment": { "type": "object", "properties": { "comment": { "type": "string" }, "date": { "type": "string" }, "user": { "$ref": "#/definitions/models.UserShortWithAvatar" } } }, "handlers.MapDiscussionResponse": { "type": "object", "properties": { "discussion": { "$ref": "#/definitions/handlers.MapDiscussion" } } }, "handlers.MapDiscussionsResponse": { "type": "object", "properties": { "discussions": { "type": "array", "items": { "$ref": "#/definitions/handlers.MapDiscussion" } } } }, "handlers.MapLeaderboardsResponse": { "type": "object", "properties": { "map": { "$ref": "#/definitions/models.Map" }, "pagination": { "$ref": "#/definitions/models.Pagination" }, "records": {} } }, "handlers.MapShortWithGame": { "type": "object", "properties": { "chapter": { "type": "string" }, "game": { "type": "string" }, "id": { "type": "integer" }, "map": { "type": "string" } } }, "handlers.MapSummaryResponse": { "type": "object", "properties": { "map": { "$ref": "#/definitions/models.Map" }, "summary": { "$ref": "#/definitions/models.MapSummary" } } }, "handlers.ProfileRankings": { "type": "object", "properties": { "cooperative": { "$ref": "#/definitions/handlers.ProfileRankingsDetails" }, "overall": { "$ref": "#/definitions/handlers.ProfileRankingsDetails" }, "singleplayer": { "$ref": "#/definitions/handlers.ProfileRankingsDetails" } } }, "handlers.ProfileRankingsDetails": { "type": "object", "properties": { "completion_count": { "type": "integer" }, "completion_total": { "type": "integer" }, "rank": { "type": "integer" } } }, "handlers.ProfileRecords": { "type": "object", "properties": { "category_id": { "type": "integer" }, "game_id": { "type": "integer" }, "map_id": { "type": "integer" }, "map_name": { "type": "string" }, "map_wr_count": { "type": "integer" }, "placement": { "type": "integer" }, "scores": { "type": "array", "items": { "$ref": "#/definitions/handlers.ProfileScores" } } } }, "handlers.ProfileResponse": { "type": "object", "properties": { "avatar_link": { "type": "string" }, "country_code": { "type": "string" }, "links": { "$ref": "#/definitions/models.Links" }, "pagination": { "$ref": "#/definitions/models.Pagination" }, "profile": { "type": "boolean" }, "rankings": { "$ref": "#/definitions/handlers.ProfileRankings" }, "records": { "type": "array", "items": { "$ref": "#/definitions/handlers.ProfileRecords" } }, "steam_id": { "type": "string" }, "titles": { "type": "array", "items": { "$ref": "#/definitions/models.Title" } }, "user_name": { "type": "string" } } }, "handlers.ProfileScores": { "type": "object", "properties": { "date": { "type": "string" }, "demo_id": { "type": "string" }, "record_id": { "type": "integer" }, "score_count": { "type": "integer" }, "score_time": { "type": "integer" } } }, "handlers.RankingsResponse": { "type": "object", "properties": { "rankings_multiplayer": { "type": "array", "items": { "$ref": "#/definitions/models.UserRanking" } }, "rankings_overall": { "type": "array", "items": { "$ref": "#/definitions/models.UserRanking" } }, "rankings_singleplayer": { "type": "array", "items": { "$ref": "#/definitions/models.UserRanking" } } } }, "handlers.RankingsSteamResponse": { "type": "object", "properties": { "rankings_multiplayer": { "type": "array", "items": { "$ref": "#/definitions/handlers.SteamUserRanking" } }, "rankings_overall": { "type": "array", "items": { "$ref": "#/definitions/handlers.SteamUserRanking" } }, "rankings_singleplayer": { "type": "array", "items": { "$ref": "#/definitions/handlers.SteamUserRanking" } } } }, "handlers.RecordResponse": { "type": "object", "properties": { "score_count": { "type": "integer" }, "score_time": { "type": "integer" } } }, "handlers.ScoreLogsResponse": { "type": "object", "properties": { "scores": { "type": "array", "items": { "$ref": "#/definitions/handlers.ScoreLogsResponseDetails" } } } }, "handlers.ScoreLogsResponseDetails": { "type": "object", "properties": { "date": { "type": "string" }, "demo_id": { "type": "string" }, "game": { "$ref": "#/definitions/models.Game" }, "map": { "$ref": "#/definitions/models.MapShort" }, "score_count": { "type": "integer" }, "score_time": { "type": "integer" }, "user": { "$ref": "#/definitions/models.UserShort" } } }, "handlers.SearchResponse": { "type": "object", "properties": { "maps": { "type": "array", "items": { "$ref": "#/definitions/handlers.MapShortWithGame" } }, "players": { "type": "array", "items": { "$ref": "#/definitions/models.UserShortWithAvatar" } } } }, "handlers.SteamUserRanking": { "type": "object", "properties": { "avatar_link": { "type": "string" }, "mp_rank": { "type": "integer" }, "mp_score": { "type": "integer" }, "overall_rank": { "type": "integer" }, "overall_score": { "type": "integer" }, "sp_rank": { "type": "integer" }, "sp_score": { "type": "integer" }, "steam_id": { "type": "string" }, "user_name": { "type": "string" } } }, "models.Category": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } }, "models.CategoryPortal": { "type": "object", "properties": { "category": { "$ref": "#/definitions/models.Category" }, "portal_count": { "type": "integer" } } }, "models.Chapter": { "type": "object", "properties": { "id": { "type": "integer" }, "image": { "type": "string" }, "is_disabled": { "type": "boolean" }, "name": { "type": "string" } } }, "models.Game": { "type": "object", "properties": { "category_portals": { "type": "array", "items": { "$ref": "#/definitions/models.CategoryPortal" } }, "id": { "type": "integer" }, "image": { "type": "string" }, "is_coop": { "type": "boolean" }, "name": { "type": "string" } } }, "models.Links": { "type": "object", "properties": { "p2sr": { "type": "string" }, "steam": { "type": "string" }, "twitch": { "type": "string" }, "youtube": { "type": "string" } } }, "models.Map": { "type": "object", "properties": { "chapter_name": { "type": "string" }, "game_name": { "type": "string" }, "id": { "type": "integer" }, "image": { "type": "string" }, "is_coop": { "type": "boolean" }, "is_disabled": { "type": "boolean" }, "map_name": { "type": "string" } } }, "models.MapHistory": { "type": "object", "properties": { "date": { "type": "string" }, "runner_name": { "type": "string" }, "score_count": { "type": "integer" } } }, "models.MapRoute": { "type": "object", "properties": { "category": { "$ref": "#/definitions/models.Category" }, "completion_count": { "type": "integer" }, "description": { "type": "string" }, "history": { "$ref": "#/definitions/models.MapHistory" }, "rating": { "type": "number" }, "route_id": { "type": "integer" }, "showcase": { "type": "string" } } }, "models.MapSelect": { "type": "object", "properties": { "category_portals": { "type": "array", "items": { "$ref": "#/definitions/models.CategoryPortal" } }, "difficulty": { "type": "integer" }, "id": { "type": "integer" }, "image": { "type": "string" }, "is_disabled": { "type": "boolean" }, "name": { "type": "string" } } }, "models.MapShort": { "type": "object", "properties": { "difficulty": { "type": "integer" }, "id": { "type": "integer" }, "image": { "type": "string" }, "is_disabled": { "type": "boolean" }, "name": { "type": "string" }, "portal_count": { "type": "integer" } } }, "models.MapSummary": { "type": "object", "properties": { "routes": { "type": "array", "items": { "$ref": "#/definitions/models.MapRoute" } } } }, "models.Pagination": { "type": "object", "properties": { "current_page": { "type": "integer" }, "page_size": { "type": "integer" }, "total_pages": { "type": "integer" }, "total_records": { "type": "integer" } } }, "models.Response": { "type": "object", "properties": { "data": {}, "message": { "type": "string" }, "success": { "type": "boolean" } } }, "models.Title": { "type": "object", "properties": { "color": { "type": "string" }, "name": { "type": "string" } } }, "models.UserRanking": { "type": "object", "properties": { "placement": { "type": "integer" }, "total_score": { "type": "integer" }, "user": { "$ref": "#/definitions/models.UserShortWithAvatar" } } }, "models.UserShort": { "type": "object", "properties": { "steam_id": { "type": "string" }, "user_name": { "type": "string" } } }, "models.UserShortWithAvatar": { "type": "object", "properties": { "avatar_link": { "type": "string" }, "steam_id": { "type": "string" }, "user_name": { "type": "string" } } } } }