whotookzakum / toweroffantasy.api

Home Page:https://api.toweroffantasy.info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

api.toweroffantasy.info

This API was built with the intention of serving data from Tower of Fantasy, an online Multiplayer MMORPG natively available in China and in development Globally.

Thanks to Zakum who provides a subdomain, FortOfFans who constantly provides game data, Emi who helps with the API backend, Sova who gave permission to use his repository as an image database and others collaborators.

Packages used

  • FastAPI
  • Uvicorn
  • Pydantic
  • Python-Dotenv
  • Python-Multipart
  • Aiohttp

Achievements

November 07, 2023 - API base goes live

Routes

  • /docs
  • /simulacra
  • /matrice
  • /weapon
  • /simulacra-v2
  • /relic
  • /food
  • /item
  • /assets

Example of use

Let's say we made a request for one of the routes (except /assets), if we don't specify an ID using just /route, the return will be a dictionary containing all the information for that route

status code: 200

{
   "object_id": {
	"keys": "values"
   },
   "object_id": {
	"keys": "values"
    }
}

But in case we only want a specific object, then we use /route/id but this route has a validation system, if the ID doesn't exist it returns error 404 (not found) or 423 (error validation on ID)

status code: 200

{
   "key_1": "value_1",
   "key_2": "value_2"
}

Language system

All routes also have a system to define which language should be returned, for this query params were used, in the request url you must pass /route?lang=possible_languages, can also be used in a route for a specific object /route/id?lang=possible_language

All possible languages are the folders name in /api/database

/assets

All objects that have icons/assets are modified to facilitate their access for example Ling Han object, the key "icon" has the value of "/assets/UI/huanxing/lihui/linghan" this is its path in the API, to facilitate "access" we are talking about you just needing to add the icon string in the API URI "https://api.toweroffantasy.info/assets/UI/huanxing/lihui/linghan"

Note

It's possible to use the API Docs to check/learn on how to use, their returns and more

Development checklist

  • simulacras
  • matrices
  • weapons
  • relics
  • foods
  • items
  • assets
  • achievements
  • currency
  • outfits

About

https://api.toweroffantasy.info

License:MIT License


Languages

Language:Python 100.0%