Skip to content

wanderer-moe/api

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 

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.