项目作者: MJ-Shashank

项目描述 :
A powerful javascript library for interacting with Clash Of Clans, Clash Royale, Brawl Stars api's.
高级语言: JavaScript
项目地址: git://github.com/MJ-Shashank/supercell-apis.git
创建时间: 2020-11-18T05:33:12Z
项目社区:https://github.com/MJ-Shashank/supercell-apis

开源协议:MIT License

下载




Project logo

supercell-apis



Status
License


A powerful javascript library for interacting with Clash Of Clans, Clash Royale, Brawl Stars api’s.


Installation

You can install supercell-apis using npm:

  1. npm install supercell-apis

Example: Configuration

  1. const { Token, ClashOfClans, ClashRoyale, BrawlStars } = require('supercell-apis');
  2. (async () => {
  3. // First argument: clashofclans / clashroyale / brawlstars
  4. // Second argument: Email
  5. // Third argument: Password
  6. // Optional, name and limit
  7. const token = await new Token('clashofclans', '<email>', '<password>', { name: '<token-name>', limit: '<token-limit>' }).init();
  8. console.log(token);
  9. // Clash Of Clans
  10. const Coc = new ClashOfClans('<token>', { cache: 120 }); // Optional Cache
  11. const coc_data = await Coc.locations();
  12. console.log(coc_data);
  13. // Clash Royale
  14. const Cr = new ClashRoyale('<token>', { cache: 120 }); // Optional Cache
  15. const cr_data = await Cr.locations();
  16. console.log(cr_data);
  17. // Brawl Stars
  18. const Bs = new BrawlStars('<token>', { cache: 120 }); // Optional Cache
  19. const bs_data = await Bs.brawlers();
  20. console.log(bs_data);
  21. })();

List of Apis

" class="reference-link">‘Clash Of Clans’

Note: <> : required and {} : optional (not always)

  1. .clans({ name: '<required>', warFrequency: '', locationId: '', minMembers: '', maxMembers: '', minClanPoints: '', minClanLevel: '', limit: '', after: '', before: '', labelIds: '' })
  2. .clan('<tag>')
  3. .members('<tag>')
  4. .war('<tag>')
  5. .warLog('<tag>', { limit: '', after: '', before: '' })
  6. .cwlRounds('<tag>')
  7. .cwl('<tag>')
  8. .player('<tag>')
  9. .playerVerify('<tag>', '<apiToken>')
  10. .clanLabels({ limit: '', after: '', before: '' })
  11. .playerLabels({ limit: '', after: '', before: '' })
  12. .locations('<locationId>', { limit: '', after: '', before: '' })
  13. .clansRank('<locationId>', { limit: '', after: '', before: '' })
  14. .playersRank('<locationId>', { limit: '', after: '', before: '' })
  15. .clansVersusRank('<locationId>', { limit: '', after: '', before: '' })
  16. .playersVersusRank('<locationId>', { limit: '', after: '', before: '' })
  17. .leagues('<leagueId>', { limit: '', after: '', before: '' })
  18. .warLeagues('<leagueId>', { limit: '', after: '', before: '' })
  19. .leaguesSeason('<leagueId>', '<seasonId>', { limit: '', after: '', before: '' })

" class="reference-link">‘Clash Royale’

Note: <> : required and {} : optional (not always)

  1. .riverRaceLog('<tag>', { limit: '', after: '', before: '' })
  2. .war('<tag>')
  3. .clan('<tag>')
  4. .warLog('<tag>', { limit: '', after: '', before: '' })
  5. .members('<tag>', { limit: '', after: '', before: '' })
  6. .clans({ name: '<required>', locationId: '', minMembers: '', maxMembers: '', minScore: '', limit: '', after: '', before: '', labelIds: '' })
  7. .currentRiverRace('<tag>')
  8. .player('<tag>')
  9. .playerBattleLog('<tag>')
  10. .playersUpcomingChests('<tag>')
  11. .cards({ limit: '', after: '', before: '' })
  12. .tournaments({ name: '', limit: '', after: '', before: '' })
  13. .tournamentsById('<tournamentId>')
  14. .locations('<locationId>', { limit: '', after: '', before: '' })
  15. .clansRank('<locationId>', { limit: '', after: '', before: '' })
  16. .playersRank('<locationId>', { limit: '', after: '', before: '' })
  17. .clanWarsRank('<locationId>', { limit: '', after: '', before: '' })
  18. .globalTournamentRank('<tournamentId>', { limit: '', after: '', before: '' })
  19. .globalTournament()

" class="reference-link">‘Brawl Stars’

Note: <> : required and {} : optional (not always)

  1. .player('<tag>')
  2. .playerBattleLog('<tag>')
  3. .club('<tag>')
  4. .members('<tag>')
  5. .brawlers({ name: '', limit: '', after: '', before: '' })
  6. .brawlersById('<tournamentId>')
  7. .clubsRank('<countryCode>', { limit: '', after: '', before: '' })
  8. .playersRank('<countryCode>', { limit: '', after: '', before: '' })
  9. .powerplay('<countryCode>', '<seasonId>', { limit: '', after: '', before: '' })
  10. .brawlersRank('<countryCode>', '<brawlersId>', { limit: '', after: '', before: '' })