Skip to content

ryancundiff/clash.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

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 16 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());
});

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published