Nasus is a League of Legends Data Scraper that uses the Riot API to gather data on champions, items, and players. Nasus provides all the data to use in Sion, a League of Legends Statistics and Analysis tool.
We use Bun, a Javascript runtime environment to run Nasus. To read more about Bun, visit the Bun Documentation.
Clone the repository and install the dependencies:
bun install
To use Nasus, you need to have a Riot API key. You can get one by visiting the Riot Developer Portal. Put your API key in the .env file in the root directory of the project.
In adition, Nasus use MongoDB to store the data. You need to have a MongoDB server running on your machine. You can download MongoDB from the MongoDB Download Center.
Nasus currently supports all the regions available in the Riot API. You can change the region in the .env file.
The available regions are:
- BR1
BRAZIL
- EUN1
EUROPE EAST
- EUW1
EUROPE WEST
- JP1
JAPAN
- KR
KOREA
- LA1
LATIN AMERICA NORTH
- LA2
LATIN AMERICA SOUTH
- NA1
NORTH AMERICA
- OC1
OCEANIA
- TR1
TURKEY
- RU
RUSSIA
- PH2
PHILIPPINES
- SG2
SINGAPORE
- TH2
THAILAND
- TW2
TAIWAN
- VN2
VIETNAM
To read more about the regions, visit the Riot API Documentation.
And the .env file should look like this:
RIOT_API_KEY=YOUR_RIOT_API_KEY
MONGO_URI=mongodb://localhost:27017/<database> #Important! Include <database> on the uri string
REGION=LAT_NORTH #Can be: BRAZIL | EU_EAST | EU_WEST | KOREA | LAT_NORTH | LAT_SOUTH | AMERICA_NORTH | OCEANIA | TURKEY | RUSSIA | JAPAN | VIETNAM | TAIWAN | THAILAND | SINGAPORE | PHILIPPINES | PBE
To run Nasus, use the following command:
bun run start
Nasus will fetch a list of 10 recent matches from a initial player. Then, it will fetch the data of all the players in those matches. It will repeat this process for each player in the list, in a recursive way.
You can change the initial player in the config.ts
file.
- Fetch data from the Riot API
- Store data in a MongoDB database
- Add error handling and retries
- Add support for more regions
- Record matchups
- Dockerize the application
- Add tests
Note
Nasus is not endorsed by Riot Games and does not reflect the views or opinions of Riot Games or anyone officially involved in producing or managing Riot Games properties. Riot Games and all associated properties are trademarks or registered trademarks of Riot Games, Inc