maxloeffler / clashpi

A wrapper for the Clash Royale API for node
1 stars 1 forks source link

Description

This package contains a simple, asynchronous, free, dependency-free node.js library for using the Clash Royale API.

Installation

Usage

Example:

First import the library and create a Client object.

const { Client } = require('clashpi');
const client = new Client(APIKEY);

Then call functions on the Client object.

client.getPlayer('#JGJYQ2P2V')
    .then(player => client
        .getUpcomingChests(player).then(console.log));

// OR

client.getUpcomingChests('#JGJYQ2P2V')
    .then(console.log);

client.getPlayerRanks('2023-03')
    .then(console.log);

Documentation

Get a list of all cards in the game, or filter by rarity or name

Get a list of all challenges

Get all information about a specific player

Get all (or a specific) upcoming chests of a specific player

Get the battle log of a specific player

Get a list of all locations in the game

Get a ranking of all clans in a certain location, either by clan ranking or by clan-war ranking

Get ranking of all players that played in a specific season, either by trophies or by path of legend rank

Get a list of all tournaments containing a specific name

Get all information of about a specific tournament

Get a list of all global tournaments