opengsq-node 0.0.1
Install from the command line:
Learn more about npm packages
$ npm install @opengsq/opengsq-node@0.0.1
Install via package.json:
"@opengsq/opengsq-node": "0.0.1"
About this version
The OpenGSQ Node library provides a convenient way to query servers from applications written in the TypeScript language.
The library supports a wide range of protocols. Here are some examples:
import { Source } from '@opengsq/opengsq-node';
To install @opengsq/opengsq-node
, run the following command in your project directory:
npm install -S @opengsq/opengsq-node
Here’s an example of how to query a server using the Source protocol:
import { Source } from "@opengsq/opengsq-node";
async function main() {
const source = new Source("91.216.250.10", 27015);
const info = await source.getInfo();
console.log("Info:", info);
const players = await source.getPlayers();
console.log("Players:", players);
const rules = await source.getRules();
console.log("Rules:", rules);
}
main();
Contributions are welcome! Please feel free to submit pull requests or open issues.
Details
- opengsq-node
-
opengsq
- 7 months ago
- MIT
- 17 dependencies
Assets
- opengsq-node-0.0.1.tgz
Download activity
- Total downloads 0
- Last 30 days 0
- Last week 0
- Today 0