diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-05-02 23:25:48 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-05-02 23:25:48 +0300 |
| commit | 0a2c6021e36be31aaffe8ace232179e2211b3140 (patch) | |
| tree | ac75a36f2f1cca02f782800144de2292782cbc0c /docs/docs.go | |
| parent | feat: set cookie and redirect after login (diff) | |
| download | lphub-0a2c6021e36be31aaffe8ace232179e2211b3140.tar.gz lphub-0a2c6021e36be31aaffe8ace232179e2211b3140.tar.bz2 lphub-0a2c6021e36be31aaffe8ace232179e2211b3140.zip | |
feat: game, chapter, map endpoints for records page
Diffstat (limited to 'docs/docs.go')
| -rw-r--r-- | docs/docs.go | 228 |
1 files changed, 222 insertions, 6 deletions
diff --git a/docs/docs.go b/docs/docs.go index 22d4362..788ca3d 100644 --- a/docs/docs.go +++ b/docs/docs.go | |||
| @@ -20,6 +20,55 @@ const docTemplate = `{ | |||
| 20 | "host": "{{.Host}}", | 20 | "host": "{{.Host}}", |
| 21 | "basePath": "{{.BasePath}}", | 21 | "basePath": "{{.BasePath}}", |
| 22 | "paths": { | 22 | "paths": { |
| 23 | "/chapters/{id}": { | ||
| 24 | "get": { | ||
| 25 | "produces": [ | ||
| 26 | "application/json" | ||
| 27 | ], | ||
| 28 | "tags": [ | ||
| 29 | "chapters" | ||
| 30 | ], | ||
| 31 | "summary": "Get chapters from the specified game id.", | ||
| 32 | "parameters": [ | ||
| 33 | { | ||
| 34 | "type": "integer", | ||
| 35 | "description": "Game ID", | ||
| 36 | "name": "id", | ||
| 37 | "in": "path", | ||
| 38 | "required": true | ||
| 39 | } | ||
| 40 | ], | ||
| 41 | "responses": { | ||
| 42 | "200": { | ||
| 43 | "description": "OK", | ||
| 44 | "schema": { | ||
| 45 | "allOf": [ | ||
| 46 | { | ||
| 47 | "$ref": "#/definitions/models.Response" | ||
| 48 | }, | ||
| 49 | { | ||
| 50 | "type": "object", | ||
| 51 | "properties": { | ||
| 52 | "data": { | ||
| 53 | "type": "array", | ||
| 54 | "items": { | ||
| 55 | "$ref": "#/definitions/models.Chapter" | ||
| 56 | } | ||
| 57 | } | ||
| 58 | } | ||
| 59 | } | ||
| 60 | ] | ||
| 61 | } | ||
| 62 | }, | ||
| 63 | "400": { | ||
| 64 | "description": "Bad Request", | ||
| 65 | "schema": { | ||
| 66 | "$ref": "#/definitions/models.Response" | ||
| 67 | } | ||
| 68 | } | ||
| 69 | } | ||
| 70 | } | ||
| 71 | }, | ||
| 23 | "/demo": { | 72 | "/demo": { |
| 24 | "get": { | 73 | "get": { |
| 25 | "produces": [ | 74 | "produces": [ |
| @@ -94,6 +143,46 @@ const docTemplate = `{ | |||
| 94 | } | 143 | } |
| 95 | } | 144 | } |
| 96 | }, | 145 | }, |
| 146 | "/games": { | ||
| 147 | "get": { | ||
| 148 | "produces": [ | ||
| 149 | "application/json" | ||
| 150 | ], | ||
| 151 | "tags": [ | ||
| 152 | "games" | ||
| 153 | ], | ||
| 154 | "summary": "Get games from the leaderboards.", | ||
| 155 | "responses": { | ||
| 156 | "200": { | ||
| 157 | "description": "OK", | ||
| 158 | "schema": { | ||
| 159 | "allOf": [ | ||
| 160 | { | ||
| 161 | "$ref": "#/definitions/models.Response" | ||
| 162 | }, | ||
| 163 | { | ||
| 164 | "type": "object", | ||
| 165 | "properties": { | ||
| 166 | "data": { | ||
| 167 | "type": "array", | ||
| 168 | "items": { | ||
| 169 | "$ref": "#/definitions/models.Game" | ||
| 170 | } | ||
| 171 | } | ||
| 172 | } | ||
| 173 | } | ||
| 174 | ] | ||
| 175 | } | ||
| 176 | }, | ||
| 177 | "400": { | ||
| 178 | "description": "Bad Request", | ||
| 179 | "schema": { | ||
| 180 | "$ref": "#/definitions/models.Response" | ||
| 181 | } | ||
| 182 | } | ||
| 183 | } | ||
| 184 | } | ||
| 185 | }, | ||
| 97 | "/login": { | 186 | "/login": { |
| 98 | "get": { | 187 | "get": { |
| 99 | "consumes": [ | 188 | "consumes": [ |
| @@ -134,11 +223,57 @@ const docTemplate = `{ | |||
| 134 | } | 223 | } |
| 135 | } | 224 | } |
| 136 | }, | 225 | }, |
| 137 | "/maps/{id}/leaderboards": { | 226 | "/maps/{id}": { |
| 138 | "get": { | 227 | "get": { |
| 139 | "consumes": [ | 228 | "produces": [ |
| 140 | "application/json" | 229 | "application/json" |
| 141 | ], | 230 | ], |
| 231 | "tags": [ | ||
| 232 | "maps" | ||
| 233 | ], | ||
| 234 | "summary": "Get maps from the specified chapter id.", | ||
| 235 | "parameters": [ | ||
| 236 | { | ||
| 237 | "type": "integer", | ||
| 238 | "description": "Chapter ID", | ||
| 239 | "name": "id", | ||
| 240 | "in": "path", | ||
| 241 | "required": true | ||
| 242 | } | ||
| 243 | ], | ||
| 244 | "responses": { | ||
| 245 | "200": { | ||
| 246 | "description": "OK", | ||
| 247 | "schema": { | ||
| 248 | "allOf": [ | ||
| 249 | { | ||
| 250 | "$ref": "#/definitions/models.Response" | ||
| 251 | }, | ||
| 252 | { | ||
| 253 | "type": "object", | ||
| 254 | "properties": { | ||
| 255 | "data": { | ||
| 256 | "type": "array", | ||
| 257 | "items": { | ||
| 258 | "$ref": "#/definitions/models.MapShort" | ||
| 259 | } | ||
| 260 | } | ||
| 261 | } | ||
| 262 | } | ||
| 263 | ] | ||
| 264 | } | ||
| 265 | }, | ||
| 266 | "400": { | ||
| 267 | "description": "Bad Request", | ||
| 268 | "schema": { | ||
| 269 | "$ref": "#/definitions/models.Response" | ||
| 270 | } | ||
| 271 | } | ||
| 272 | } | ||
| 273 | } | ||
| 274 | }, | ||
| 275 | "/maps/{id}/leaderboards": { | ||
| 276 | "get": { | ||
| 142 | "produces": [ | 277 | "produces": [ |
| 143 | "application/json" | 278 | "application/json" |
| 144 | ], | 279 | ], |
| @@ -290,9 +425,6 @@ const docTemplate = `{ | |||
| 290 | }, | 425 | }, |
| 291 | "/maps/{id}/summary": { | 426 | "/maps/{id}/summary": { |
| 292 | "get": { | 427 | "get": { |
| 293 | "consumes": [ | ||
| 294 | "application/json" | ||
| 295 | ], | ||
| 296 | "produces": [ | 428 | "produces": [ |
| 297 | "application/json" | 429 | "application/json" |
| 298 | ], | 430 | ], |
| @@ -530,7 +662,19 @@ const docTemplate = `{ | |||
| 530 | "200": { | 662 | "200": { |
| 531 | "description": "OK", | 663 | "description": "OK", |
| 532 | "schema": { | 664 | "schema": { |
| 533 | "$ref": "#/definitions/models.Response" | 665 | "allOf": [ |
| 666 | { | ||
| 667 | "$ref": "#/definitions/models.Response" | ||
| 668 | }, | ||
| 669 | { | ||
| 670 | "type": "object", | ||
| 671 | "properties": { | ||
| 672 | "data": { | ||
| 673 | "$ref": "#/definitions/models.SearchResponse" | ||
| 674 | } | ||
| 675 | } | ||
| 676 | } | ||
| 677 | ] | ||
| 534 | } | 678 | } |
| 535 | }, | 679 | }, |
| 536 | "400": { | 680 | "400": { |
| @@ -599,6 +743,31 @@ const docTemplate = `{ | |||
| 599 | } | 743 | } |
| 600 | }, | 744 | }, |
| 601 | "definitions": { | 745 | "definitions": { |
| 746 | "models.Chapter": { | ||
| 747 | "type": "object", | ||
| 748 | "properties": { | ||
| 749 | "game_id": { | ||
| 750 | "type": "integer" | ||
| 751 | }, | ||
| 752 | "id": { | ||
| 753 | "type": "integer" | ||
| 754 | }, | ||
| 755 | "name": { | ||
| 756 | "type": "string" | ||
| 757 | } | ||
| 758 | } | ||
| 759 | }, | ||
| 760 | "models.Game": { | ||
| 761 | "type": "object", | ||
| 762 | "properties": { | ||
| 763 | "id": { | ||
| 764 | "type": "integer" | ||
| 765 | }, | ||
| 766 | "name": { | ||
| 767 | "type": "string" | ||
| 768 | } | ||
| 769 | } | ||
| 770 | }, | ||
| 602 | "models.LoginResponse": { | 771 | "models.LoginResponse": { |
| 603 | "type": "object", | 772 | "type": "object", |
| 604 | "properties": { | 773 | "properties": { |
| @@ -662,6 +831,20 @@ const docTemplate = `{ | |||
| 662 | "records": {} | 831 | "records": {} |
| 663 | } | 832 | } |
| 664 | }, | 833 | }, |
| 834 | "models.MapShort": { | ||
| 835 | "type": "object", | ||
| 836 | "properties": { | ||
| 837 | "chapter_id": { | ||
| 838 | "type": "integer" | ||
| 839 | }, | ||
| 840 | "id": { | ||
| 841 | "type": "integer" | ||
| 842 | }, | ||
| 843 | "name": { | ||
| 844 | "type": "string" | ||
| 845 | } | ||
| 846 | } | ||
| 847 | }, | ||
| 665 | "models.MapSummary": { | 848 | "models.MapSummary": { |
| 666 | "type": "object", | 849 | "type": "object", |
| 667 | "properties": { | 850 | "properties": { |
| @@ -784,6 +967,39 @@ const docTemplate = `{ | |||
| 784 | "records": {} | 967 | "records": {} |
| 785 | } | 968 | } |
| 786 | }, | 969 | }, |
| 970 | "models.SearchResponse": { | ||
| 971 | "type": "object", | ||
| 972 | "properties": { | ||
| 973 | "maps": { | ||
| 974 | "type": "array", | ||
| 975 | "items": { | ||
| 976 | "type": "object", | ||
| 977 | "properties": { | ||
| 978 | "id": { | ||
| 979 | "type": "integer" | ||
| 980 | }, | ||
| 981 | "name": { | ||
| 982 | "type": "string" | ||
| 983 | } | ||
| 984 | } | ||
| 985 | } | ||
| 986 | }, | ||
| 987 | "players": { | ||
| 988 | "type": "array", | ||
| 989 | "items": { | ||
| 990 | "type": "object", | ||
| 991 | "properties": { | ||
| 992 | "steam_id": { | ||
| 993 | "type": "string" | ||
| 994 | }, | ||
| 995 | "user_name": { | ||
| 996 | "type": "string" | ||
| 997 | } | ||
| 998 | } | ||
| 999 | } | ||
| 1000 | } | ||
| 1001 | } | ||
| 1002 | }, | ||
| 787 | "models.UserRanking": { | 1003 | "models.UserRanking": { |
| 788 | "type": "object", | 1004 | "type": "object", |
| 789 | "properties": { | 1005 | "properties": { |