npm.io
1.0.19 • Published 11 months ago

ftwgl

Licence
MIT
Version
1.0.19
Deps
1
Size
23 kB
Vulns
0
Weekly
0

FTWClient Library

Description

FTWClient is a JavaScript library designed for interacting with the FTW API. It simplifies the process of making API calls and handling responses, providing an easy-to-use interface for developers working with the FTW platform.

Features

  • Simplified API calls to the FTW platform.
  • Easy handling of responses.
  • Supports various FTW functionalities like creating cups, updating matches, and more.

Installation

Install FTWClient using npm:

npm install ftwclient

Or using yarn:

yarn add ftwclient

Usage

Here's a quick example to get you started:

const {FTWClient, UserTeamRole, GameType, MatchType} = require('ftwgl');

async function test() {
	let c = new FTWClient(
		"api-key-here",
		"https://dev.ftwgl.net",
		logging=true
	);

	console.log("CTF", GameType.capture_the_flag, UserTeamRole.leader, MatchType.group);

	await c.serverLocations()
}

test().then(() => console.log('Test completed')).catch(error => console.error('Error occurred', error));

Replace 'your_api_key' and 'your_api_host' with your actual FTW API key and host.

License

This project is licensed under the MIT License.