1.0.1 • Published 3 years ago

coc.supercell v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

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]
1.0.1

3 years ago

1.0.0

3 years ago