FetchCRAPI-Node.js
FetchCRAPI-Node.js
This module utilizes a Node.js web scraping approach to fetch data from the Clash Royale API. The retrieved data is in JSON format, allowing users to easily customize the content they desire. Here’s a usage example:
1
https://xiang511.com/hydromechanics/TCRS.html
Require
Node.js
Visual studio code
Features
- Player personal information
- Local ladder ranking information
- Clan information
- Global ladder ranking information
Preparation
- Go to ClashRoyaleAPI
- Log in and click My Account (top right corner)
- Click “Create New KEY” =>
The official needs your IP address, remember to check your IP first
- Save your token (you will need it later)
- Okay, we’re all set. Let’s start!
Usage
Fork this repo or use
https://github.com/Xiang511/FetchCRAPI-Node.js.git
Go to
config.env
Add your TokenThere is some sample information in it
1
2
3
4
5
6
API_KEY= "your Token "
local=57000228 ( You can check AreaCodeFile to find out )
player_tag=%2322R920J00 ( You can check in your game ) ```Due to transcoding issues all "#" must be converted to "%23" ```
player_name=Xiang ( your name )
node integrate.js
The generated data will be displayed in the
json folder
Done
License
This project is published under Apache-2.0 license
This post is licensed under CC BY 4.0 by the author.