Releases: clashperk/clashofclans.js
Releases · clashperk/clashofclans.js
1.5.4
1.5.3
1.5.2
1.5.1
1.5.0
- 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 existingtoken
field is considered deprecated and will be removed in the next version.
- const client = new Client({ token: [] });
+ const client = new Client({ keys: [] });
-
Fixed
Client#parseTag(tag: string)
method. -
New documentation site https://clashofclans.js.org/
1.4.1
1.4.0
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 tostatusCode
-
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.