1.0.2 • Published 1 year ago

bbr-api v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

bbr-api

An API wrapper for the BattleBit Remastered public API.

License Version

Installation

You can install the package using npm:

npm install bbr-api

Usage

After installation, you can import the Client class from the package and create a new instance of the API client. Here's an example:

const { Client } = require('bbr-api');

const bbrApiClient = new Client();

Once you have the API client instantiated, you can make API requests. For example, you can use the getServerList() method to retrieve the list of servers. Here's an example that logs a few details about each server:

async function main() {
  const response = await bbrApiClient.getServerList();

  response.servers.forEach(server => {
    console.log({
      name: server.Name,
      map: server.Map,
      players: server.Players,
      isOfficial: server.IsOfficial,
    });
  });
}

main();

This example fetches the server list and iterates over each server, logging the server name, map, number of players, and whether it is an official server.

Please note that there are currently no other endpoints available. More endpoints will be added in the future as soon as they are available within the BattleBit Remastered API.

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago