Socket
Socket
Sign inDemoInstall

clashapi

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clashapi

A module to consume clashapi.xyz


Version published
Weekly downloads
4
decreased by-33.33%
Maintainers
2
Weekly downloads
 
Created
Source

Clashapi

A npm package for Clash Royale that consumes clashapi using trae to provide information about the game.

Content

  1. How to use
    1. Install
    2. Basic Usage
    3. Methods
  2. Want to help
  3. License

How to use?

Consume the API to get all the information you need.

Install

$ npm install --save clashapi
$ yarn add clashapi

Basic usage

If you are not using trae (Pro tip: give it a try):

import clashapi from 'clashapi'

clashapi.chests()
  .then(...)

If you are using that awesome library:

import trae from 'trae'
import clashapiFactory from 'clashapi/factory'

const clashapi = clashapiFactory(trae)

clashapi.chests()
  .then(...)

Methods

MethodDescription
clashapi.arenas()All Arenas information
clashapi.arenas(:id)Single Arena information
clashapi.arenas(:idName)Single Arena information
clashapi.cardsAll Cards information
clashapi.cards(:id)Single Card information
clashapi.cards(:idName)Single Card information
clashapi.chestsAll Chests information
clashapi.chests(:id)Single Chest information
clashapi.chests(:idName)Single Chest information
clashapi.leaguesAll Leagues information
clashapi.leagues(:id)Single League information
clashapi.leagues(:idName)Single League information
clashapi.playersAll Players levels information
clashapi.players(:id)Player level information
clashapi.players(:idName)Player level information

Examples

clashapi
  .chests() // returns all chests
  
clashapi
  .cards('royale-giant') // returns information about the royale giant

clashapi
  .leagues() // returns all the leagues
  .then(leagues => leagues[0]._id) // returns the first league id
  .then(clashapi.leagues) // returns the information for the first league, sending the id to the API

Want to help?

Create an issue to report bugs or give suggestions on how to improve this project.

If you like the package, please star this repository and/or the API repository.

If you create an app using this package, please mention that you are using clashapi and add your app to the table on the API repository.

If you want to contribute to the package, feel free to create a pull request.

If you ❤️ the API, help me pay the API hosting!

License

MIT License.

Keywords

FAQs

Package last updated on 25 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc