Skip to content

euvictorguedes/gamedig-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gamedig API

Get information about your favorite server without enter ingame

GitHub

How To Use   |    License


ℹ️ How To Use

To clone and run this application, you'll need Git, Node.js v10.16 or higher + Yarn v1.13 or higher installed on your computer. From your command line:

# Clone this repository
$ git clone https://github.com/vitogd/gamedig-api gamedig-api

# Go into the repository
$ cd gamedig-api

# Install dependencies
$ npm install

# Run the api
$ npm run start:dev

The default port is 3000, you can change it editing the server.js file:

const port = process.env.PORT || 3000; // change the 3000 to your favorite port

How to get the information?

Base URL: localhost:3000/

Method Endpoint Params Return
GET /info/ game, ip, port server info object

List of supported games

The param port is optional depending of the game.

Example usage:

GET localhost:3000/info/?game=css&ip=177.54.144.126&port=27212

Return:

{
    "info": {
        "name": "HyperHops [WL]",
        "map": "bhop_malabar7",
        "password": false,
        "raw": {14 items},
        "maxplayers": 12,
        "players": [1 item],
        "bots": [1 item],
        "connect": "177.54.144.126:27212",
        "ping": 30
    }
}

📝 License

This project is under the MIT license. See the LICENSE for more information.


About

🎮 Get information about your favorite server without enter ingame.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published