Hyrule-Compendium-API icon indicating copy to clipboard operation
Hyrule-Compendium-API copied to clipboard

V3 Roadmap

Open gadhagod opened this issue 3 years ago • 15 comments

The new version of the Hyrule Compendium API will serve data on more than just the compendium entries. It will contain the following categories of data:

  • [x] in-game compendium (/compendium)
  • [x] geographical regions (/regions) (https://github.com/gadhagod/Hyrule-Compendium-API/discussions/29)
  • [ ] recipes (/recipes) (https://github.com/gadhagod/Hyrule-Compendium-API/issues/27)

The goal is to make this API more than just the compendium; it should be able to give data on all (or many) aspects of the game, not just the in-game items.

Recipes

Recipes will be divided based on their base ingredient (e.g seafood). Multi-dimensional arrays will be used to represent possible ingredients to tackle the problem of substitutable ingredients.

Possible example recipe response:

{
  "name": "meat and rice bowl",
  "image": "https://botw-compendium.herokuapp.com/api/v3/recipes/recipe/meat-and-rice-bowl",
  "category": "meat",
  "hearts_recovered": 4.0, // hearts recovered from consumption
  "ingredients": [["raw meat", "raw bird drumstick"], ["rock salt"], ["hylian rice"]] // array of arrays, each inner array represents possible ingredients
  "effect": "attack", // enhancing effect of dish (empty if none)
  "duration": 60, // duration of effect in seconds (0 if no effect)
}

Map

Data on each region, including encompassed shrines and settlements, will be provided.

  • [x] Breath of the Wild regions
  • [ ] Tears of the Kingdom regions

Compendium

  • [x] The compendium entries will have a field dlc that specifies if it is a master-mode exclusive. The /master_mode endpoint will remain to avoid ID conflicts.
  • [x] The food and non_food keys in the creatures category response will be removed. Each creature entry will have a boolean property edible instead.
  • [x] /all(endpoint to get all entries) will not have keys for each category.
  • [x] attack and defense keys of items of the equipment category will be nested in the properties key like so:
{
  // ...
  "properties": {
    "attack": 14,
     "defense": 0
  }
  • [x] Tears of the Kingdom entries (by setting ?game=totk or ?game=2) (https://github.com/gadhagod/Hyrule-Compendium-API/discussions/36)
  • [x] Tears of the Kingdom images

Code Changes

These changes will not affect the usage of the API. It will improve performance and clean up code.

  • [x] Separate branches for API versions
  • [x] Use Flask blueprints instead of Flask().add_url_rule
  • [x] Improve queries to reduce API latency
    • Instead of executing multiple queries, using UNION is a better solution
  • [x] Create staging app to test changes

Additional Tasks

  • [x] Documentation

Feel free to chime in on this thread.

gadhagod avatar May 23 '22 07:05 gadhagod

Great solution for ingredients, I'm glad you'll be including recipes! I noticed the '?' on Towns and Regions. Perhaps 'Places' or 'Areas' would be a better category heading?

edit: I see, 'Towns and Regions' is the heading of the existing issue 🙄.

jeff-stienstra avatar May 23 '22 14:05 jeff-stienstra

Thanks @jeff-stienstra. You brought up a great point. I don't think /map is the best route for this endpoint. I'm thinking /regions to make it more specific. I'm updating this issue to make this change now.

gadhagod avatar May 23 '22 14:05 gadhagod

Experimental region endpoints are available at:

  • https://botw-compendium.herokuapp.com/api/v3/regions.
  • https://botw-compendium.herokuapp.com/api/v3/regions/<region> (<region> refers to a tower region, for example, "eldin")

gadhagod avatar Aug 11 '22 02:08 gadhagod

  • https://botw-compendium.herokuapp.com/api/v3/regions/eldin/<region>.

Very nice!! I get loads of data when testing the API. There are so many shrines in this game!

But I'm unsure what would go where <region> is in your second endpoint. Will there eventually be a 'regions' array within the object where "name" === "eldin"?

Also, not to be picky, but is 'region' the correct terminology considering 'Eldin' is itself a region? I didn't see any specific terms used when researching other than these sub-regions being called 'areas'. ie Eldin Canyon is a large area within the Eldin region. 🤷‍♂️

Looks like Eldin has these main sub-regions/areas: Eldin Canyon Death Mountain Eldin Mountains Goron City

Great update!

jeff-stienstra avatar Aug 16 '22 21:08 jeff-stienstra

Thanks for your feedback @jeff-stienstra.

Looks like Eldin has these main sub-regions/areas

I do plan on adding more information about regions. As of now only shrines, DLC shrines, and settlements are given, but I will add some sub-regions and important areas in the future. Thanks for your suggestion!

<region> would be the value of name of one of the regions from https://botw-compendium.herokuapp.com/api/v3/regions. For example, you could make a request to https://botw-compendium.herokuapp.com/api/v3/regions/central.

gadhagod avatar Aug 17 '22 00:08 gadhagod

Just want to show my appreciation for such an awesome project! I've started my own project based on this, and I hope to include an ability for users to login and save recipes, and keep track of what ingredients you have/need for recipes. Right now it's just showing cards for the ingredients, but I'm looking forward to the recipes being a part of it! Here's a link if you want to look -->

I'm relative newbie to development, but I'd be happy to help in any way I can! Cheers and thanks again for your hard work on such a useful API.

YanceMcFinn avatar Aug 16 '23 22:08 YanceMcFinn

Hi @YanceMcFinn. Thanks for your appreciation! Your project is very cool, and I'm excited to see the new features. Seeing people building projects with this API is what makes the development worth it.

After the release of TOTK features, development on the Hyrule Compendium API has slowed down, as I have not had enough time to add new features. Because of this, I'm not sure when recipes will be ready. If you are willing to contribute to this effort, please let me know; it would greatly help.

gadhagod avatar Aug 16 '23 23:08 gadhagod

I'm relative newbie to development...

Great job on the recipe cards page! That's a fun project and a great way to practice front end design and API usage as a newer developer. Maybe you could create a landing page that will link to the different API resources gadhagod has available (recipes, regions, shrines, etc)?

Keep it up!

jeff-stienstra avatar Aug 21 '23 17:08 jeff-stienstra

Hi, I'm really enjoying playing around with the API as someone who is learning web programming att he moment. I was wondering if there's anything that can be done to assist with progress you're looking to make on the roadmap. The one piece I'm specifically interested in having access to in the API is ToTK images but I'd be happy to lend a hand in any area.

Thanks!

yanader avatar Oct 22 '23 10:10 yanader

Hey not sure if this is still being updated or needs some work. I've been playing around with it to make a tracker, willing to assist with getting TOTK images up if still an option!

XavierLora avatar Feb 19 '24 21:02 XavierLora