diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2024-09-12 00:25:15 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2024-09-12 00:25:15 +0300 |
| commit | df6f6cb5ff8957be8f01d58d60857da2c094a3d9 (patch) | |
| tree | 5ec5a8a95633d7fa6cce62654a9bc6fc6204f788 /backend/docs/docs.go | |
| parent | refactor: fix module ver (diff) | |
| download | lphub-df6f6cb5ff8957be8f01d58d60857da2c094a3d9.tar.gz lphub-df6f6cb5ff8957be8f01d58d60857da2c094a3d9.tar.bz2 lphub-df6f6cb5ff8957be8f01d58d60857da2c094a3d9.zip | |
refactor: unofficial rankings implementation
Diffstat (limited to 'backend/docs/docs.go')
| -rw-r--r-- | backend/docs/docs.go | 90 |
1 files changed, 88 insertions, 2 deletions
diff --git a/backend/docs/docs.go b/backend/docs/docs.go index f652a1e..c4b2801 100644 --- a/backend/docs/docs.go +++ b/backend/docs/docs.go | |||
| @@ -1171,9 +1171,9 @@ const docTemplate = `{ | |||
| 1171 | } | 1171 | } |
| 1172 | } | 1172 | } |
| 1173 | }, | 1173 | }, |
| 1174 | "/rankings": { | 1174 | "/rankings/lphub": { |
| 1175 | "get": { | 1175 | "get": { |
| 1176 | "description": "Get rankings of every player.", | 1176 | "description": "Get rankings of every player from LPHUB.", |
| 1177 | "produces": [ | 1177 | "produces": [ |
| 1178 | "application/json" | 1178 | "application/json" |
| 1179 | ], | 1179 | ], |
| @@ -1202,6 +1202,37 @@ const docTemplate = `{ | |||
| 1202 | } | 1202 | } |
| 1203 | } | 1203 | } |
| 1204 | }, | 1204 | }, |
| 1205 | "/rankings/steam": { | ||
| 1206 | "get": { | ||
| 1207 | "description": "Get rankings of every player from Steam.", | ||
| 1208 | "produces": [ | ||
| 1209 | "application/json" | ||
| 1210 | ], | ||
| 1211 | "tags": [ | ||
| 1212 | "rankings" | ||
| 1213 | ], | ||
| 1214 | "responses": { | ||
| 1215 | "200": { | ||
| 1216 | "description": "OK", | ||
| 1217 | "schema": { | ||
| 1218 | "allOf": [ | ||
| 1219 | { | ||
| 1220 | "$ref": "#/definitions/models.Response" | ||
| 1221 | }, | ||
| 1222 | { | ||
| 1223 | "type": "object", | ||
| 1224 | "properties": { | ||
| 1225 | "data": { | ||
| 1226 | "$ref": "#/definitions/handlers.RankingsSteamResponse" | ||
| 1227 | } | ||
| 1228 | } | ||
| 1229 | } | ||
| 1230 | ] | ||
| 1231 | } | ||
| 1232 | } | ||
| 1233 | } | ||
| 1234 | } | ||
| 1235 | }, | ||
| 1205 | "/search": { | 1236 | "/search": { |
| 1206 | "get": { | 1237 | "get": { |
| 1207 | "description": "Get all user and map data matching to the query.", | 1238 | "description": "Get all user and map data matching to the query.", |
| @@ -1789,6 +1820,29 @@ const docTemplate = `{ | |||
| 1789 | } | 1820 | } |
| 1790 | } | 1821 | } |
| 1791 | }, | 1822 | }, |
| 1823 | "handlers.RankingsSteamResponse": { | ||
| 1824 | "type": "object", | ||
| 1825 | "properties": { | ||
| 1826 | "rankings_multiplayer": { | ||
| 1827 | "type": "array", | ||
| 1828 | "items": { | ||
| 1829 | "$ref": "#/definitions/handlers.SteamUserRanking" | ||
| 1830 | } | ||
| 1831 | }, | ||
| 1832 | "rankings_overall": { | ||
| 1833 | "type": "array", | ||
| 1834 | "items": { | ||
| 1835 | "$ref": "#/definitions/handlers.SteamUserRanking" | ||
| 1836 | } | ||
| 1837 | }, | ||
| 1838 | "rankings_singleplayer": { | ||
| 1839 | "type": "array", | ||
| 1840 | "items": { | ||
| 1841 | "$ref": "#/definitions/handlers.SteamUserRanking" | ||
| 1842 | } | ||
| 1843 | } | ||
| 1844 | } | ||
| 1845 | }, | ||
| 1792 | "handlers.RecordResponse": { | 1846 | "handlers.RecordResponse": { |
| 1793 | "type": "object", | 1847 | "type": "object", |
| 1794 | "properties": { | 1848 | "properties": { |
| @@ -1854,6 +1908,38 @@ const docTemplate = `{ | |||
| 1854 | } | 1908 | } |
| 1855 | } | 1909 | } |
| 1856 | }, | 1910 | }, |
| 1911 | "handlers.SteamUserRanking": { | ||
| 1912 | "type": "object", | ||
| 1913 | "properties": { | ||
| 1914 | "avatar_link": { | ||
| 1915 | "type": "string" | ||
| 1916 | }, | ||
| 1917 | "mp_rank": { | ||
| 1918 | "type": "integer" | ||
| 1919 | }, | ||
| 1920 | "mp_score": { | ||
| 1921 | "type": "integer" | ||
| 1922 | }, | ||
| 1923 | "overall_rank": { | ||
| 1924 | "type": "integer" | ||
| 1925 | }, | ||
| 1926 | "overall_score": { | ||
| 1927 | "type": "integer" | ||
| 1928 | }, | ||
| 1929 | "sp_rank": { | ||
| 1930 | "type": "integer" | ||
| 1931 | }, | ||
| 1932 | "sp_score": { | ||
| 1933 | "type": "integer" | ||
| 1934 | }, | ||
| 1935 | "steam_id": { | ||
| 1936 | "type": "string" | ||
| 1937 | }, | ||
| 1938 | "user_name": { | ||
| 1939 | "type": "string" | ||
| 1940 | } | ||
| 1941 | } | ||
| 1942 | }, | ||
| 1857 | "models.Category": { | 1943 | "models.Category": { |
| 1858 | "type": "object", | 1944 | "type": "object", |
| 1859 | "properties": { | 1945 | "properties": { |