Skip to content

Commit e469c39

Browse files
authored
New seed in match and country contexts (#6)
* API 3.0 Update * fix wrong example * update phase points * record leaderboard details * phase point leaderboard example * e * Update doc * oops wrong ratelimit * update some missing stuff * phasePoint fix * new seed / country endpoints
1 parent f6d1a59 commit e469c39

File tree

2 files changed

+61
-11
lines changed

2 files changed

+61
-11
lines changed

assets/scripts/responses.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ const endpoints = {
4949
type: 'Integer?',
5050
description: 'rank of current season'
5151
},
52+
{
53+
name: 'country',
54+
type: 'String?',
55+
description: 'country code with lowercased ISO 3166-1 alpha-2 format'
56+
},
5257
{
5358
name: 'achievements.display',
5459
type: 'Achievement[]',
@@ -395,6 +400,12 @@ const endpoints = {
395400
type: 'Integer',
396401
required: false,
397402
description: 'Specific season (default: current season number)'
403+
},
404+
{
405+
name: 'country',
406+
type: 'String',
407+
required: false,
408+
description: 'Specific country code with lowercased ISO 3166-1 alpha-2 format'
398409
}
399410
],
400411
structures: [
@@ -440,6 +451,12 @@ const endpoints = {
440451
type: 'Integer',
441452
required: false,
442453
description: 'Specific season (default: current season number)'
454+
},
455+
{
456+
name: 'country',
457+
type: 'String',
458+
required: false,
459+
description: 'Specific country code with lowercased ISO 3166-1 alpha-2 format'
443460
}
444461
],
445462
structures: [

index.html

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<link rel="stylesheet" href="assets/vendor/bootstrap/css/bootstrap.min.css">
1111
<!-- <link rel="stylesheet" href="assets/vendor/font-awesome/css/font-awesome.min.css"> -->
1212
<link rel="stylesheet" href="assets/vendor/linearicons/style.css">
13-
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.min.css" rel="stylesheet">
13+
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">
1414
<!-- MAIN CSS -->
1515
<link rel="stylesheet" href="assets/css/main.css">
1616
<!-- GOOGLE FONTS -->
@@ -42,6 +42,9 @@
4242
<img src="assets/img/icon_x256.png" width="250px" height="250px">
4343
</div>
4444
<ul class="nav">
45+
<li>
46+
<a href="#endpoint" class=""><i class="fa fa-paper-plane"></i>Endpoints</a>
47+
</li>
4548
<li>
4649
<a href="#responses-structure" data-toggle="collapse" class="collapsed"><i class="fa fa-book"></i><span>Basic Responses</span> <i class="icon-submenu lnr lnr-chevron-left"></i></a>
4750
<div id="responses-structure" class="collapse">
@@ -100,6 +103,21 @@
100103
<h1><strong>MCSR Ranked Rest API Document</strong></h1>
101104
<div class="alert alert-danger">All endpoints have a ratelimit of 500 requests per 10 minutes unless otherwise specified.<br>If you want to use API Key with expanded ratelimit, please make a #ticket in our <a href="https://mcsrranked.com/discord" target="_blank">Discord Server</a></div>
102105
<hr />
106+
<div class="container-fluid" id="endpoint">
107+
<h2 class="page-title"><strong>Endpoints</strong></h2>
108+
<div class="row">
109+
<div class="panel">
110+
<div class="panel-heading">
111+
<pre>https://api.mcsrranked.com/</pre>
112+
<pre>https://mcsrranked.com/api/</pre>
113+
</div>
114+
<div class="panel-body">
115+
You can use both, but we would recommend to use first one.
116+
</div>
117+
</div>
118+
</div>
119+
</div>
120+
<hr />
103121
<div class="container-fluid" id="response-200">
104122
<h2 class="page-title"><strong><span class="label label-success">200</span> &nbsp; Success Response</strong></h2>
105123
<h4 class="page-title">JSON response when an API request is successfully processed.</h4>
@@ -231,6 +249,11 @@ <h2 class="page-title"><strong><span class="label label-success">Class</span> &n
231249
<td><code>Integer?</code></td>
232250
<td>User's Elo rank</td>
233251
</tr>
252+
<tr>
253+
<td>country</td>
254+
<td><code>String?</code></td>
255+
<td>User's country code. It's lowercased <a href="https://en.wikipedia.org/wiki/ISO_3166-1" target="_blank">ISO 3166-1 alpha-2</a> format</td>
256+
</tr>
234257
</tbody>
235258
</table>
236259
</div>
@@ -329,6 +352,26 @@ <h2 class="page-title"><strong><span class="label label-success">Class</span> &n
329352
<td><code>UserProfile[]</code></td>
330353
<td></td>
331354
</tr>
355+
<tr>
356+
<td>seed.id</td>
357+
<td><code>String?</code></td>
358+
<td>Seed id if it's ranked filtered seed. it's not real seed number of the seed. it will be `null` if seed is not filtered.</td>
359+
</tr>
360+
<tr>
361+
<td>seed.overworld</td>
362+
<td><code>String?</code></td>
363+
<td>Overworld structure type of the seed. it will be `null` if seed is not filtered.</td>
364+
</tr>
365+
<tr>
366+
<td>seed.bastion</td>
367+
<td><code>String?</code></td>
368+
<td>Bastion remnants type of the seed. it will be `null` if seed is not filtered.</td>
369+
</tr>
370+
<tr>
371+
<td>seed.variations</td>
372+
<td><code>String[]</code></td>
373+
<td>Noticable variations of the seed. it will be empty array if seed is not filtered.</td>
374+
</tr>
332375
<tr>
333376
<td>result.uuid</td>
334377
<td><code>String?</code></td>
@@ -379,16 +422,6 @@ <h2 class="page-title"><strong><span class="label label-success">Class</span> &n
379422
<td><code>String?</code></td>
380423
<td>Special tag of this match. It's used by get matches with tag</td>
381424
</tr>
382-
<tr>
383-
<td>seedType</td>
384-
<td><code>String?</code></td>
385-
<td>Overworld seed type of this match's seed</td>
386-
</tr>
387-
<tr>
388-
<td>bastionType</td>
389-
<td><code>String?</code></td>
390-
<td>Bastion in nether (as intended) type of this match's seed</td>
391-
</tr>
392425
<tr>
393426
<td>completions[].uuid</td>
394427
<td><code>String</code></td>

0 commit comments

Comments
 (0)