Skip to content

ervin-sungkono/MLBB-API

Repository files navigation

MLBB Wiki API

An API that serves data from MLBB Wiki, currently the available data that can be requested are:

  • Heroes Data
  • Equipment Data
  • Emblem Data

This API also uses cron jobs that automatically updates the data once a week.

DISCLAIMER: this project is not affiliated with Moonton or MLBB Wiki and serves as learning purpose only.

Resources

Documentation

Here are the available endpoints for this API:

  1. [GET] Return All Hero Data
https://mlbb-wiki-api.vercel.app/api/heroes
  1. [GET] Return Hero Data by ID
https://mlbb-wiki-api.vercel.app/api/heroes/[id]
  1. [GET] Return All Equipment Data
https://mlbb-wiki-api.vercel.app/api/equipment
  1. [GET] Return Equipment Data by ID
https://mlbb-wiki-api.vercel.app/api/equipment/[id]
  1. [GET] Return All Emblem Data
https://mlbb-wiki-api.vercel.app/api/emblem

Limitations

  1. This API has a rate limit of 120 requests per minute for each endpoint
  2. This API is developed in focus for Vercel Deployment
  3. Some limitations when deploying in Vercel (especially when using Hobby Plan) is the timeout duration when executing serverless functions, Vercel allows a maximum duration of 60 seconds and a memory of 1024 MB for serverless functions.
  4. This project can only run in production mode, learn more about how to run it locally here

Installation and Setup

  1. Clone this repository
git clone https://github.com/ervin-sungkono/qr-code-gen.git
  1. Install dependency
npm install
  1. Copy environment variables and fill in the required values
  • CRON_SECRET: Random string for running cron jobs in Vercel, Click Here to learn about setting cron jobs in Vercel
cp .env.example .env
  1. Run the app
npm run dev

Deployment

This project is deployed using Vercel, to learn more about deploying Next.js app on Vercel Click Here