Skip to content

wanderer-moe/api

Repository files navigation

Banner

Quality API Response CDN Response

Source code for the API powering wanderer.moe — using Cloudflare Workers with R2 Storage for the CDN, and D1 for the Database.


Usage

Wrangler

Configuration is in wrangler.toml - this includes the R2 Bucket and D1 Database.

  • Run wrangler dev to preview locally.
  • Run wrangler deploy to publish to Cloudflare Workers.

Actions

  • There is a GitHub Action that automatically deploys to Cloudflare Workers on every push to main — you can find it in .github/workflows/deploy.yml.

  • If you're using Github Actions, you will have to setup a secret with a Cloudflare API token. You can generate the API token here — use the Edit Cloudflare Workers template.

API Reference

Games

Get all games

  GET api.wanderer.moe/games

Get game data

  GET api.wanderer.moe/game/${gameId}
Parameter Type Description
gameId string Required — game to get data for

Get a game's asset data

  GET api.wanderer.moe/game/${gameId}/${asset}
Parameter Type Description
gameId string Required — game to get data for
asset string Required — asset to get data for

Authors

License

api.wanderer.moe is licensed under the GNU Affero General Public License v3.0 - You must state all significant changes made to the original software, make the source code available to the public with credit to the original author, original source, and use the same license.