Readme formatting

This commit is contained in:
Michael Morrison 2013-07-12 04:18:55 -05:00
parent 399dba0d9c
commit 7a1b0231d0
1 changed files with 25 additions and 25 deletions

View File

@ -22,16 +22,16 @@ Gamedig.query(
); );
``` ```
Input Parameters ### Input Parameters
---
* type (one of the types from the protocols folder) * **type**: One of the types from the protocols folder
* host * **host**
* port (uses the protocol default if not set) * **port**: Uses the protocol default if not set
* login (required by nadeo protocol) * **login**: Required by nadeo protocol
* password (required by nadeo protocol) * **password**: Required by nadeo protocol
###Callback Function
Callback Function
---
The callback function is "guaranteed" to be called exactly once. The callback function is "guaranteed" to be called exactly once.
If an error occurs, the returned object will contain an "error" key, indicating the issue. If an error occurs, the returned object will contain an "error" key, indicating the issue.
@ -39,20 +39,20 @@ If the error key exists, it should be assumed that the game server is offline or
Otherwise, the returned object is guaranteed to contain the following keys: Otherwise, the returned object is guaranteed to contain the following keys:
* name * **name**
* map * **map**
* password (boolean) * **password**: Boolean
* maxplayers * **maxplayers**
* players (may contain name, ping, score, team, address) * **players**: Array of objects, each may contain name, ping, score, team, address
* bots (same as players) * **bots**: Same as players
* raw (contains special keys depending on the type of server queried - UNSTABLE) * **raw**: Contains special keys depending on the type of server queried - UNSTABLE
* notes (passed through from the input) * **notes**: Passed through from the input
* query (details about the query performed) * **query**: Details about the query performed
* host * **host**
* address * **address**
* port * **port**
* type * **type**
* pretty (a "pretty" string describing the game) * **pretty**: A "pretty" string describing the game
It can usually be assumed that the number of players online is equal to the length of the players array. It can usually be assumed that the number of players online is equal to the length of the players array.
Some servers may return an additional player count number, which may be present in the unstable raw object. Some servers may return an additional player count number, which may be present in the unstable raw object.
@ -67,7 +67,7 @@ Supported Games
* Half Life: Death Match * Half Life: Death Match
* Ricochet * Ricochet
* Counter-Strike: 1.6 * Counter-Strike: 1.6
* + others * \+ others
* Nadeo Protocol * Nadeo Protocol
* Trackmania Forever * Trackmania Forever
* Trackmania 2 * Trackmania 2
@ -82,7 +82,7 @@ Supported Games
* Counter-Strike: Source * Counter-Strike: Source
* Counter-Strike: Global Offensive * Counter-Strike: Global Offensive
* Team Fortress 2 * Team Fortress 2
* + others * \+ others
* Tshock Protocol * Tshock Protocol
* Terraria * Terraria
* Unreal 2 Protocol * Unreal 2 Protocol