rage-mp
v2.0.0
Published
API for getting rage-mp server info & status.
Downloads
21
Maintainers
Readme
RAGE MP
API for getting RAGE MP server info & status.
📥 Installation
npm i rage-mp
🧷 import
Javascript
const RageMp = require("rage-mp").default;
TypeScript
import { RageMp } from "rage-mp";
⚙️Usage
const rageMp = new RageMp({timeout:1000})
const server = await rageMp.getSingleServer("ip:port")
//result:
// name: "server Name
// gamemode: "gangwar",
// url: "rage.mp",
// lang: "en",
// players: 10,
// peak: 1,
// maxplayers: 100,
// ip: "ip:port"
⚡ALL METHODS
- getServers - get all servers
- getSingleServer - get single server with ip:port
- getServersByGamemode - get all servers by gamemode
- getServersByLang - get all servers by lang
🪂EXAMPLES
const RageMp = require("rage-mp").default;
(async () => {
const rageMp = new RageMp({})
const servers = await rageMp.getServers()
console.log(servers) // servers array
})();
📝 TODO
- add more methods
- better docs