1.1.0 • Published 2 years ago

clash.js v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Npm Downloads

About

clash.js is a simple Node.js module that allows you to easily interact with the Clash of Clans API

  • Object-oriented
  • Predictable abstractions
  • 100% coverage of API (striving for)
  • Typed

Implementation

Requires Node.js version 14.0.0 or newer

npm i clash.js

Example

const { Client } = require("clash.js");

const client = new Client({
    email: "youremailaddress@gmail.com",
    password: "********",
    retry: true, // whether you want the client to retry its requests upon ip change
    parse: true // whether you want to have tag parameters parsed for discrepancies
});

client.login(async () => {
    let player = await client.getPlayer("abc123"); // -> "#ABC123"
    let player_clan = await player.getClan();

    console.log(player_clan.getName());
});
1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.0

2 years ago

1.0.3

2 years ago