coc.supercell
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

coc.supercell

About

coc.supercell is a Node.js module that allows you to easily interact with the Clash Of Clans API.

Installation

npm install coc.supercell
yarn add coc.supercell

Example usage

Fetch a clan:

import { Client, ClanTypes } from "coc.supercell";

const client = new Client({ token: "XXXXX" });

const myClan = await client.clans.fetch("#2Q0U9YVYC");

console.log(myClan.name, myClan.type === ClanTypes.OPEN);
// -> Zenitsu
// -> false

console.log(myClan.members.length, myClan.members.map(x => x.level));
// -> 5
// -> [128, 83, 52, 45, 30]

Package Sidebar

Install

npm i coc.supercell

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

10.7 kB

Total Files

25

Last publish

Collaborators

  • sweany