0.0.2 • Published 12 months ago

@opengsq/opengsq-node v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

OpenGSQ Node Library

Node.js Build NPM Type Definitions NPM Version NPM Downloads NPM Downloads Documentation GitHub license

The OpenGSQ Node library provides a convenient way to query servers from applications written in the TypeScript language.

Supported Protocols

The library supports a wide range of protocols. Here are some examples:

import * as opengsq from '@opengsq/opengsq-node';

Installation

To install @opengsq/opengsq-node, run the following command in your project directory:

npm install -S @opengsq/opengsq-node

Usage

Here’s an example of how to query a server using the Source protocol:

import * as opengsq from "@opengsq/opengsq-node";

async function main() {
    const source = new opengsq.Source({
        host: '91.216.250.10',
        port: 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();

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues.

https://github.com/opengsq/opengsq-node/graphs/contributors

Stargazers over time

Stargazers over time

0.0.2

12 months ago

0.0.1

1 year ago