Skip to content

Commit

Permalink
docs: update docs related to playerInfo and bump version querystring
Browse files Browse the repository at this point in the history
  • Loading branch information
ayan4m1 committed Oct 13, 2024
1 parent 745883d commit 4c55462
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# minestat-es

[![Package Version](https://badge.fury.io/js/minestat-es.svg?)](https://www.npmjs.com/package/minestat-es)
[![Package Version](https://badge.fury.io/js/minestat-es.svg?2)](https://www.npmjs.com/package/minestat-es)
[![Code Coverage](https://codecov.io/gh/ayan4m1/minestat-es/branch/main/graph/badge.svg?token=UKTTU7XNAM)](https://codecov.io/gh/ayan4m1/minestat-es)

## features
Expand Down Expand Up @@ -74,12 +74,15 @@ If the server is offline, the object will also contain the properties:

If the server is online, the object will also contain the following properties:

| Key | Type | Description |
| ---------- | -------- | ------------------------------------------------- |
| version | `string` | The server's version string |
| motd | `string` | The server's Message of the Day |
| players | `number` | The number of players on the server |
| maxPlayers | `number` | The maximum number of players the server supports |
| Key | Type | Description |
| ---------- | ---------- | --------------------------------------------------------- |
| version | `string` | The server's version string |
| motd | `string` | The server's Message of the Day |
| players | `number` | The number of players on the server |
| maxPlayers | `number` | The maximum number of players the server supports |
| playerInfo | `object[]` | An aray of { id, name } objects for each connected player |

**NOTE**: playerInfo is only populated if the server chooses to do so.

`fetchServerInfo` rejects if an error occurs during SRV record resolution.

Expand Down

0 comments on commit 4c55462

Please sign in to comment.