ftwgl
v1.0.18
Published
FTW JavaScript Client
Downloads
5
Readme
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.