You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I want to thank you guys for the all work you've done in creating such a great open-source service, but one of the biggest hurdles towards use of the API currently is the fact that the Ingredients endpoint returns values defaulted to 100g measurements, and in order to get to a human-readable form I have to find the ingredient ID via search, then perform a second query like:
And from the array of weight units returned, I have to query the weight units endpoint to get the human readable name.
I spent last night spinning up a Docker image, pruned all the languages but english, ran the manager script to generate the SQLite database, then converted the SQLite DB into a series of CSV files for each table, wrote a batch script to iterate over every file and use Mongo CLI to convert into a MongoDB collection and send to hosted mlab server, and then wrote Ruby models for them.
But still, to get the human-readable weight units from an Ingredient, I have to do something like this:
Hi, I want to thank you guys for the all work you've done in creating such a great open-source service, but one of the biggest hurdles towards use of the API currently is the fact that the Ingredients endpoint returns values defaulted to 100g measurements, and in order to get to a human-readable form I have to find the ingredient ID via search, then perform a second query like:
https://wger.de/api/v2/ingredientweightunit/?format=json&ingredient=1074
And from the array of weight units returned, I have to query the weight units endpoint to get the human readable name.
I spent last night spinning up a Docker image, pruned all the languages but english, ran the manager script to generate the SQLite database, then converted the SQLite DB into a series of CSV files for each table, wrote a batch script to iterate over every file and use Mongo CLI to convert into a MongoDB collection and send to hosted mlab server, and then wrote Ruby models for them.
But still, to get the human-readable weight units from an Ingredient, I have to do something like this:
And the models/queries are not pretty:
Could the weight units and names be embedded with the top-level ingredient object in the API please?
The text was updated successfully, but these errors were encountered: