diff options
Diffstat (limited to 'backend/docs/docs.go')
| -rw-r--r-- | backend/docs/docs.go | 148 |
1 files changed, 105 insertions, 43 deletions
diff --git a/backend/docs/docs.go b/backend/docs/docs.go index 44d53e1..7ce9a8b 100644 --- a/backend/docs/docs.go +++ b/backend/docs/docs.go | |||
| @@ -250,37 +250,6 @@ const docTemplate = `{ | |||
| 250 | } | 250 | } |
| 251 | } | 251 | } |
| 252 | }, | 252 | }, |
| 253 | "/logs/score": { | ||
| 254 | "get": { | ||
| 255 | "description": "Get score logs of every player.", | ||
| 256 | "produces": [ | ||
| 257 | "application/json" | ||
| 258 | ], | ||
| 259 | "tags": [ | ||
| 260 | "logs" | ||
| 261 | ], | ||
| 262 | "responses": { | ||
| 263 | "200": { | ||
| 264 | "description": "OK", | ||
| 265 | "schema": { | ||
| 266 | "allOf": [ | ||
| 267 | { | ||
| 268 | "$ref": "#/definitions/models.Response" | ||
| 269 | }, | ||
| 270 | { | ||
| 271 | "type": "object", | ||
| 272 | "properties": { | ||
| 273 | "data": { | ||
| 274 | "$ref": "#/definitions/handlers.ScoreLogsResponse" | ||
| 275 | } | ||
| 276 | } | ||
| 277 | } | ||
| 278 | ] | ||
| 279 | } | ||
| 280 | } | ||
| 281 | } | ||
| 282 | } | ||
| 283 | }, | ||
| 284 | "/maps/{mapid}/discussions": { | 253 | "/maps/{mapid}/discussions": { |
| 285 | "get": { | 254 | "get": { |
| 286 | "description": "Get map discussions with specified map id.", | 255 | "description": "Get map discussions with specified map id.", |
| @@ -1220,6 +1189,68 @@ const docTemplate = `{ | |||
| 1220 | } | 1189 | } |
| 1221 | } | 1190 | } |
| 1222 | }, | 1191 | }, |
| 1192 | "/stats/scores": { | ||
| 1193 | "get": { | ||
| 1194 | "description": "Get score logs of every player.", | ||
| 1195 | "produces": [ | ||
| 1196 | "application/json" | ||
| 1197 | ], | ||
| 1198 | "tags": [ | ||
| 1199 | "stats" | ||
| 1200 | ], | ||
| 1201 | "responses": { | ||
| 1202 | "200": { | ||
| 1203 | "description": "OK", | ||
| 1204 | "schema": { | ||
| 1205 | "allOf": [ | ||
| 1206 | { | ||
| 1207 | "$ref": "#/definitions/models.Response" | ||
| 1208 | }, | ||
| 1209 | { | ||
| 1210 | "type": "object", | ||
| 1211 | "properties": { | ||
| 1212 | "data": { | ||
| 1213 | "$ref": "#/definitions/handlers.ScoresResponse" | ||
| 1214 | } | ||
| 1215 | } | ||
| 1216 | } | ||
| 1217 | ] | ||
| 1218 | } | ||
| 1219 | } | ||
| 1220 | } | ||
| 1221 | } | ||
| 1222 | }, | ||
| 1223 | "/stats/timeline": { | ||
| 1224 | "get": { | ||
| 1225 | "description": "Get the history of portal count world records over time.", | ||
| 1226 | "produces": [ | ||
| 1227 | "application/json" | ||
| 1228 | ], | ||
| 1229 | "tags": [ | ||
| 1230 | "stats" | ||
| 1231 | ], | ||
| 1232 | "responses": { | ||
| 1233 | "200": { | ||
| 1234 | "description": "OK", | ||
| 1235 | "schema": { | ||
| 1236 | "allOf": [ | ||
| 1237 | { | ||
| 1238 | "$ref": "#/definitions/models.Response" | ||
| 1239 | }, | ||
| 1240 | { | ||
| 1241 | "type": "object", | ||
| 1242 | "properties": { | ||
| 1243 | "data": { | ||
| 1244 | "$ref": "#/definitions/handlers.TimelineResponse" | ||
| 1245 | } | ||
| 1246 | } | ||
| 1247 | } | ||
| 1248 | ] | ||
| 1249 | } | ||
| 1250 | } | ||
| 1251 | } | ||
| 1252 | } | ||
| 1253 | }, | ||
| 1223 | "/token": { | 1254 | "/token": { |
| 1224 | "get": { | 1255 | "get": { |
| 1225 | "description": "Gets the token cookie value from the user.", | 1256 | "description": "Gets the token cookie value from the user.", |
| @@ -1774,18 +1805,7 @@ const docTemplate = `{ | |||
| 1774 | } | 1805 | } |
| 1775 | } | 1806 | } |
| 1776 | }, | 1807 | }, |
| 1777 | "handlers.ScoreLogsResponse": { | 1808 | "handlers.ScoresDetails": { |
| 1778 | "type": "object", | ||
| 1779 | "properties": { | ||
| 1780 | "scores": { | ||
| 1781 | "type": "array", | ||
| 1782 | "items": { | ||
| 1783 | "$ref": "#/definitions/handlers.ScoreLogsResponseDetails" | ||
| 1784 | } | ||
| 1785 | } | ||
| 1786 | } | ||
| 1787 | }, | ||
| 1788 | "handlers.ScoreLogsResponseDetails": { | ||
| 1789 | "type": "object", | 1809 | "type": "object", |
| 1790 | "properties": { | 1810 | "properties": { |
| 1791 | "date": { | 1811 | "date": { |
| @@ -1811,6 +1831,17 @@ const docTemplate = `{ | |||
| 1811 | } | 1831 | } |
| 1812 | } | 1832 | } |
| 1813 | }, | 1833 | }, |
| 1834 | "handlers.ScoresResponse": { | ||
| 1835 | "type": "object", | ||
| 1836 | "properties": { | ||
| 1837 | "scores": { | ||
| 1838 | "type": "array", | ||
| 1839 | "items": { | ||
| 1840 | "$ref": "#/definitions/handlers.ScoresDetails" | ||
| 1841 | } | ||
| 1842 | } | ||
| 1843 | } | ||
| 1844 | }, | ||
| 1814 | "handlers.SearchResponse": { | 1845 | "handlers.SearchResponse": { |
| 1815 | "type": "object", | 1846 | "type": "object", |
| 1816 | "properties": { | 1847 | "properties": { |
| @@ -1860,6 +1891,34 @@ const docTemplate = `{ | |||
| 1860 | } | 1891 | } |
| 1861 | } | 1892 | } |
| 1862 | }, | 1893 | }, |
| 1894 | "handlers.TimelinePoint": { | ||
| 1895 | "type": "object", | ||
| 1896 | "properties": { | ||
| 1897 | "count": { | ||
| 1898 | "type": "integer" | ||
| 1899 | }, | ||
| 1900 | "date": { | ||
| 1901 | "type": "string" | ||
| 1902 | } | ||
| 1903 | } | ||
| 1904 | }, | ||
| 1905 | "handlers.TimelineResponse": { | ||
| 1906 | "type": "object", | ||
| 1907 | "properties": { | ||
| 1908 | "timeline_multiplayer": { | ||
| 1909 | "type": "array", | ||
| 1910 | "items": { | ||
| 1911 | "$ref": "#/definitions/handlers.TimelinePoint" | ||
| 1912 | } | ||
| 1913 | }, | ||
| 1914 | "timeline_singleplayer": { | ||
| 1915 | "type": "array", | ||
| 1916 | "items": { | ||
| 1917 | "$ref": "#/definitions/handlers.TimelinePoint" | ||
| 1918 | } | ||
| 1919 | } | ||
| 1920 | } | ||
| 1921 | }, | ||
| 1863 | "models.Category": { | 1922 | "models.Category": { |
| 1864 | "type": "object", | 1923 | "type": "object", |
| 1865 | "properties": { | 1924 | "properties": { |
| @@ -1945,6 +2004,9 @@ const docTemplate = `{ | |||
| 1945 | "chapter_name": { | 2004 | "chapter_name": { |
| 1946 | "type": "string" | 2005 | "type": "string" |
| 1947 | }, | 2006 | }, |
| 2007 | "difficulty": { | ||
| 2008 | "type": "integer" | ||
| 2009 | }, | ||
| 1948 | "game_name": { | 2010 | "game_name": { |
| 1949 | "type": "string" | 2011 | "type": "string" |
| 1950 | }, | 2012 | }, |