Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

clash-of-clans-sdk-node

ashwin111137MIT1.0.7

Clash of Clans unofficial SDK

coc, clash-of-clans, sdk, api, promise, async, clash of clans, clash of clans api, clash-of-clans-api

readme

Clash of Clans Unofficial SDK 🎮

Install :star2:

npm i clash-of-clans-sdk-node

NPM 👾

https://www.npmjs.com/package/clash-of-clans-sdk-node

Usage:sparkles:

const ClashOfClansSDK = require('clash-of-clans-sdk-node');


; (async function main() {
    const connection = await new ClashOfClansSDK(
        email = process.env.EMAIL || 'yourEmailGoesHere',
        password = process.env.PASSWORD || 'yourPasswordGoesHere'
    );


    const tokens = await connection.listTokens();
    console.log(tokens);

    const key = {
        name: 'name*of*the*key',
        description: 'description|of|the|key',
        cidrRanges: ['0.0.0.0'], // Whitelist IP Address 
        scopes: null
    };
    const createdToken = await connection.createTokens(key);
    console.log(createdToken);

    const deleteKey = await connection.deleteKey('id-goes-here');
    console.log(deleteKey)
})()

Author👨‍💻

Ashwin