Git Product home page Git Product logo

brawl-stars's Introduction

@statscell/brawl

Node.js client for working with brawl stars API.

Usage

Install the package using:

npm install @statscell/brawl

Use the package as:

import { Client } from '@statscell/brawl';
// OR
const { Client } = require('@statscell/brawl');

// token can be obtained from https://developers.brawlstars.com/
const client = new Client({ token: 'token-from-dev-portal' });

client.getPlayer('YJ0LVRQQ')
  .then((player) => {
   console.log(`${player.name} - ${player.tag}`);
  })
  .catch((err) => console.log(err));

The above example is just a basic example. You can do lot more with the package.

Available Methods

  • Client.getPlayer(playerTag)

    • Get information about specified player tag.
  • Client.getPlayerBattles(playerTag)

    • Get battles of specified player tag.
  • Client.getClub(clubTag)

    • Get information about specified club tag.
  • Client.getClubMembers(clubTag)

    • Get members of specified club tag.
  • Client.getBrawlers()

    • Get information about all the brawlers.
  • Client.getBrawler(brawlerId)

    • Get information about the specified brawler.
  • Client.getClubRankings(country, Options)

    • Get club rankings for specified country.
    • country is optional. If not specified is default to global
  • Client.getPlayerRankings(country, Options)

    • Get player rankings for specified country.
    • country is optional. If not specified is default to global
  • Client.getBrawlerRankings(brawlerId, country, Options)

    • Get club rankings for specified country.
    • country is optional. If not specified is default to global
  • Client.getPowerPlayRankings(brawlerId, country, Options)

    • Get powerplay rankings for specified country.
    • country is optional. If not specified is default to global
  • Client.getPowerPlaySeasons(country, Options)

    • Get powerplay seasons.
    • country is optional. If not specified is default to global

Search Options

Options to filter search result..

  • limit: number -> No. of items to return.
  • before: string -> Return only items that occur before this marker.
  • after: string -> Return only items that occour after this marker.

brawl-stars's People

Contributors

bsantosh909 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.