|
1 | 1 | <!doctype html>
|
2 | 2 | <html lang="en">
|
3 |
| - <head> |
4 |
| - <meta charset="UTF-8" /> |
5 |
| - <link rel="icon" type="image/png" href="/icon.png" /> |
6 |
| - <link rel="stylesheet" href="/index.css" /> |
7 |
| - <meta name="viewport" content="width=device-width" /> |
| 3 | +<head> |
| 4 | + <meta charset="UTF-8"/> |
| 5 | + <link rel="icon" type="image/png" href="/icon.png"/> |
| 6 | + <link rel="stylesheet" href="/index.css"/> |
| 7 | + <meta name="viewport" content="width=device-width"/> |
8 | 8 | <meta
|
9 |
| - property="og:title" |
10 |
| - content="mcping.me minecraft server testing API" |
| 9 | + property="og:title" |
| 10 | + content="mcping.me minecraft server testing API" |
11 | 11 | />
|
12 |
| - <meta property="og:type" content="website" /> |
13 |
| - <meta property="og:image" content="https://mcping.me/icon.png" /> |
14 |
| - <meta property="og:url" content="https://mcping.me/api/" /> |
15 |
| - <meta property="og:site_name" content="mcping.me" /> |
| 12 | + <meta property="og:type" content="website"/> |
| 13 | + <meta property="og:image" content="https://mcping.me/icon.png"/> |
| 14 | + <meta property="og:url" content="https://mcping.me/api/"/> |
| 15 | + <meta property="og:site_name" content="mcping.me"/> |
16 | 16 | <meta
|
17 |
| - property="og:description" |
18 |
| - content="A simple REST API for pinging Minecraft Java Edition and Bedrock edition servers. Also included: A system to test if some minecraft services are working. Free for all to use." |
| 17 | + property="og:description" |
| 18 | + content="A simple REST API for pinging Minecraft Java Edition and Bedrock edition servers. Also included: A system to test if some minecraft services are working. Free for all to use." |
19 | 19 | />
|
20 | 20 | <meta
|
21 |
| - name="description" |
22 |
| - content="A simple REST API for pinging Minecraft Java Edition and Bedrock edition servers. Also included: A system to test if some minecraft services are working. Free for all to use." |
| 21 | + name="description" |
| 22 | + content="A simple REST API for pinging Minecraft Java Edition and Bedrock edition servers. Also included: A system to test if some minecraft services are working. Free for all to use." |
23 | 23 | />
|
24 | 24 | <title>Minecraft Server Testing API - mcping</title>
|
25 |
| - </head> |
| 25 | +</head> |
26 | 26 |
|
27 |
| - <body id="apiBody"> |
28 |
| - <h1>MCping API</h1> |
29 |
| - <p> |
30 |
| - The MCping API is very simple. There is a Java API at /api/java/, and a |
31 |
| - bedrock api at /api/bedrock/. To specify what server to ping, you append |
32 |
| - that server to the end of the URL, like so: |
33 |
| - <a href="/api/java/mcping.me">/api/java/mcping.me</a>. |
34 |
| - </p> |
35 |
| - <p> |
36 |
| - The response will look as below, with an "icon" base64 PNG field added if |
37 |
| - the server has an icon. The latency is in milliseconds, from Toronto, |
38 |
| - Canada. Keep in mind that some servers may use signcode colors for the |
39 |
| - MOTD and player sample. Your application should handle this. The player |
40 |
| - sample is often used for advertising, so take it with a grain of salt. The |
41 |
| - Bedrock API response is the same, with the caveat of never returning the |
42 |
| - icon. The bedrock player list may also be synthetic. |
43 |
| - </p> |
44 |
| - <pre><code id="examplePingResponse">{ |
45 |
| - "latency": 47, |
| 27 | +<body id="apiBody"> |
| 28 | +<h1>MCping API</h1> |
| 29 | +<p> |
| 30 | + The MCping API is very simple. There is a Java API at /api/java/, and a |
| 31 | + bedrock api at /api/bedrock/. To specify what server to ping, you append |
| 32 | + that server to the end of the URL, like so: |
| 33 | + <a href="/api/java/mcping.me">/api/java/mcping.me</a>. |
| 34 | +</p> |
| 35 | +<p> |
| 36 | + The response will look as below, with an "icon" base64 PNG field added if |
| 37 | + the server has an icon. The latency is in milliseconds, from Toronto, |
| 38 | + Canada. Keep in mind that some servers may use signcode colors for the |
| 39 | + MOTD and player sample. Your application should handle this. The player |
| 40 | + sample is often used for advertising, so take it with a grain of salt. The |
| 41 | + Bedrock API response is the same, with the caveat of never returning the |
| 42 | + icon. The bedrock player list may also be synthetic. |
| 43 | +</p> |
| 44 | +<pre><code id="examplePingResponse">{ |
| 45 | + "latency": 42, |
46 | 46 | "players": {
|
47 |
| - "online": 0, |
| 47 | + "online": 1, |
48 | 48 | "maximum": 20,
|
49 |
| - "sample": [] |
| 49 | + "sample": [ |
| 50 | + { |
| 51 | + "uuid": "bbb47773bb48438e806b7731b2724e84", |
| 52 | + "name": "mcping_me" |
| 53 | + } |
| 54 | + ] |
50 | 55 | },
|
51 | 56 | "motd": "Minecraft Support Discord Testing Server",
|
52 | 57 | "version": {
|
53 | 58 | "protocol": 765,
|
54 | 59 | "broadcast": "1.20.4"
|
55 | 60 | }
|
56 | 61 | }</code></pre>
|
57 |
| - <p> |
58 |
| - There is also a Mojang Services API, at |
59 |
| - <a href="/api/services">/api/services</a>. This is useful for checking if |
60 |
| - the authservers or Xbox Services are having issues. Example response |
61 |
| - below. The possible values for each field are |
62 |
| - <code>DefiniteProblems</code>, <code>PossibleProblems</code>, and |
63 |
| - <code>Operational</code>. |
64 |
| - </p> |
65 |
| - <pre><code class="language-json">{ |
| 62 | +<p> |
| 63 | + There is also a Mojang Services API, at |
| 64 | + <a href="/api/services">/api/services</a>. This is useful for checking if |
| 65 | + the authservers or Xbox Services are having issues. Example response |
| 66 | + below. The possible values for each field are |
| 67 | + <code>DefiniteProblems</code>, <code>PossibleProblems</code>, and |
| 68 | + <code>Operational</code>. |
| 69 | +</p> |
| 70 | +<pre><code class="language-json">{ |
66 | 71 | "Xbox services": "Operational",
|
67 | 72 | "SessionServer": "Operational",
|
68 | 73 | "Mojang API": "Operational",
|
69 | 74 | "Minecraft API": "Operational"
|
70 | 75 | }</code></pre>
|
71 |
| - <p> |
72 |
| - In the root document (<a href="https://mcping.me/" |
73 |
| - ><code>https://mcping.me/</code></a |
74 |
| - >), you can specify an auto-ping URL fragment. These are of the format |
75 |
| - <code>#ping;<edition>;<hostname></code>, and will |
76 |
| - automatically initialize a ping for the specified edition to the specified |
77 |
| - hostname and port. For example, you could have |
78 |
| - <a href="https://mcping.me/#ping;j;hypixel.net" |
79 |
| - ><code>https://mcping.me/#ping;j;hypixel.net</code></a |
80 |
| - >. |
81 |
| - </p> |
82 |
| - </body> |
| 76 | +<p> |
| 77 | + In the root document (<a href="https://mcping.me/" |
| 78 | +><code>https://mcping.me/</code></a |
| 79 | +>), you can specify an auto-ping URL fragment. These are of the format |
| 80 | + <code>#ping;<edition>;<hostname></code>, and will |
| 81 | + automatically initialize a ping for the specified edition to the specified |
| 82 | + hostname and port. For example, you could have |
| 83 | + <a href="https://mcping.me/#ping;j;hypixel.net" |
| 84 | + ><code>https://mcping.me/#ping;j;hypixel.net</code></a |
| 85 | + >. |
| 86 | +</p> |
| 87 | +</body> |
83 | 88 | </html>
|
0 commit comments