瀏覽統計
Post

FetchCRAPI-Node.js

FetchCRAPI-Node.js

GitHub last commit GitHub commit activity GitHub Created At GitHub License

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

  1. Go to ClashRoyaleAPI
  2. Log in and click My Account (top right corner)
  3. Click “Create New KEY” => The official needs your IP address, remember to check your IP first
  4. Save your token (you will need it later)
  5. Okay, we’re all set. Let’s start!

Usage

  1. Fork this repo or use https://github.com/Xiang511/FetchCRAPI-Node.js.git

  2. Go to config.env Add your Token

  3. There 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 )

  1. node integrate.js

  2. The generated data will be displayed in the json folder

  3. Done

License

This project is published under Apache-2.0 license

This post is licensed under CC BY 4.0 by the author.