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/swagger.json | |
| 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/swagger.json')
| -rw-r--r-- | backend/docs/swagger.json | 90 |
1 files changed, 88 insertions, 2 deletions
diff --git a/backend/docs/swagger.json b/backend/docs/swagger.json index 6de5978..7613d2c 100644 --- a/backend/docs/swagger.json +++ b/backend/docs/swagger.json | |||
| @@ -1165,9 +1165,9 @@ | |||
| 1165 | } | 1165 | } |
| 1166 | } | 1166 | } |
| 1167 | }, | 1167 | }, |
| 1168 | "/rankings": { | 1168 | "/rankings/lphub": { |
| 1169 | "get": { | 1169 | "get": { |
| 1170 | "description": "Get rankings of every player.", | 1170 | "description": "Get rankings of every player from LPHUB.", |
| 1171 | "produces": [ | 1171 | "produces": [ |
| 1172 | "application/json" | 1172 | "application/json" |
| 1173 | ], | 1173 | ], |
| @@ -1196,6 +1196,37 @@ | |||
| 1196 | } | 1196 | } |
| 1197 | } | 1197 | } |
| 1198 | }, | 1198 | }, |
| 1199 | "/rankings/steam": { | ||
| 1200 | "get": { | ||
| 1201 | "description": "Get rankings of every player from Steam.", | ||
| 1202 | "produces": [ | ||
| 1203 | "application/json" | ||
| 1204 | ], | ||
| 1205 | "tags": [ | ||
| 1206 | "rankings" | ||
| 1207 | ], | ||
| 1208 | "responses": { | ||
| 1209 | "200": { | ||
| 1210 | "description": "OK", | ||
| 1211 | "schema": { | ||
| 1212 | "allOf": [ | ||
| 1213 | { | ||
| 1214 | "$ref": "#/definitions/models.Response" | ||
| 1215 | }, | ||
| 1216 | { | ||
| 1217 | "type": "object", | ||
| 1218 | "properties": { | ||
| 1219 | "data": { | ||
| 1220 | "$ref": "#/definitions/handlers.RankingsSteamResponse" | ||
| 1221 | } | ||
| 1222 | } | ||
| 1223 | } | ||
| 1224 | ] | ||
| 1225 | } | ||
| 1226 | } | ||
| 1227 | } | ||
| 1228 | } | ||
| 1229 | }, | ||
| 1199 | "/search": { | 1230 | "/search": { |
| 1200 | "get": { | 1231 | "get": { |
| 1201 | "description": "Get all user and map data matching to the query.", | 1232 | "description": "Get all user and map data matching to the query.", |
| @@ -1783,6 +1814,29 @@ | |||
| 1783 | } | 1814 | } |
| 1784 | } | 1815 | } |
| 1785 | }, | 1816 | }, |
| 1817 | "handlers.RankingsSteamResponse": { | ||
| 1818 | "type": "object", | ||
| 1819 | "properties": { | ||
| 1820 | "rankings_multiplayer": { | ||
| 1821 | "type": "array", | ||
| 1822 | "items": { | ||
| 1823 | "$ref": "#/definitions/handlers.SteamUserRanking" | ||
| 1824 | } | ||
| 1825 | }, | ||
| 1826 | "rankings_overall": { | ||
| 1827 | "type": "array", | ||
| 1828 | "items": { | ||
| 1829 | "$ref": "#/definitions/handlers.SteamUserRanking" | ||
| 1830 | } | ||
| 1831 | }, | ||
| 1832 | "rankings_singleplayer": { | ||
| 1833 | "type": "array", | ||
| 1834 | "items": { | ||
| 1835 | "$ref": "#/definitions/handlers.SteamUserRanking" | ||
| 1836 | } | ||
| 1837 | } | ||
| 1838 | } | ||
| 1839 | }, | ||
| 1786 | "handlers.RecordResponse": { | 1840 | "handlers.RecordResponse": { |
| 1787 | "type": "object", | 1841 | "type": "object", |
| 1788 | "properties": { | 1842 | "properties": { |
| @@ -1848,6 +1902,38 @@ | |||
| 1848 | } | 1902 | } |
| 1849 | } | 1903 | } |
| 1850 | }, | 1904 | }, |
| 1905 | "handlers.SteamUserRanking": { | ||
| 1906 | "type": "object", | ||
| 1907 | "properties": { | ||
| 1908 | "avatar_link": { | ||
| 1909 | "type": "string" | ||
| 1910 | }, | ||
| 1911 | "mp_rank": { | ||
| 1912 | "type": "integer" | ||
| 1913 | }, | ||
| 1914 | "mp_score": { | ||
| 1915 | "type": "integer" | ||
| 1916 | }, | ||
| 1917 | "overall_rank": { | ||
| 1918 | "type": "integer" | ||
| 1919 | }, | ||
| 1920 | "overall_score": { | ||
| 1921 | "type": "integer" | ||
| 1922 | }, | ||
| 1923 | "sp_rank": { | ||
| 1924 | "type": "integer" | ||
| 1925 | }, | ||
| 1926 | "sp_score": { | ||
| 1927 | "type": "integer" | ||
| 1928 | }, | ||
| 1929 | "steam_id": { | ||
| 1930 | "type": "string" | ||
| 1931 | }, | ||
| 1932 | "user_name": { | ||
| 1933 | "type": "string" | ||
| 1934 | } | ||
| 1935 | } | ||
| 1936 | }, | ||
| 1851 | "models.Category": { | 1937 | "models.Category": { |
| 1852 | "type": "object", | 1938 | "type": "object", |
| 1853 | "properties": { | 1939 | "properties": { |