Skip to content

Releases: clashperk/clashofclans.js

1.5.4

06 Oct 13:25
a06582a
Compare
Choose a tag to compare
  • Typings for encodeTag(tag: string): string

1.5.3

29 Sep 11:19
86b33a6
Compare
Choose a tag to compare
  • Typings for attacksPerMember and warPreference

1.5.2

15 Jul 08:46
474bf29
Compare
Choose a tag to compare
  • Fix Typings and jsDocs for ClientOptions

1.5.1

08 Jul 09:53
69dc498
Compare
Choose a tag to compare
  • Typings for Clan#requiredTownhallLevel

1.5.0

26 Jun 09:26
ec00963
Compare
Choose a tag to compare
  • Extension for creating API keys for the external IP the code is running on. Therefore no static IP is required and always ready to be deployed on Serverless platform like Heroku.
const { Client } = require('clashofclans.js');
const client = new Client();

(async () => {
	await client.init({ email: '', password: '' });
	// you would have to run the `init` method just for once.
    
	const data = await client.clan('#2PP');
	console.log(data);
})();
  • Now client options accepts an array of keys. The existing token field is considered deprecated and will be removed in the next version.
- const client = new Client({ token: [] });

+ const client = new Client({ keys: [] });

1.4.1

16 May 15:08
4210d6e
Compare
Choose a tag to compare
  • Typing Support added for all API Data.
  • New method client.goldPassSeason() and client.parseTag() have been added.

1.4.0

16 May 13:51
eda2ba2
Compare
Choose a tag to compare

Node.js v14.0.0 or newer is required.

Breaking Changes

  • Few methods renamed.

    • leagueId() -> league()
    • locationId() -> loaction()
    • warLeagueId() -> warLeague()
    • clanWarlog() -> clanWarLog()
    • currentWar() -> currentClanWar()
    • clanWarLeagueWarTags() -> clanWarLeagueWar()
  • Additional property status renamed to statusCode

  • Cache-Control property maxAge is now in milliseconds.

  • New method detailedClanMembers(members: { tag: string }[]) added.

    const data = await client.clan('#8QU8J9LP');
    await client.detailedClanMembers(data.memberList); // returns array of player objects 
  • Verify Player API Token.

    const data = await client.verifyPlayerToken('#9Q92C8R20', 'pd3NN9x2');
    if (data.status === 'ok') console.log('Verified!');
  • Multiple token support added.

    new Client({ token: [''] }); // token: string | string[];
  • TypeScript Support added.