Determining correct recipe/item id?

Determining correct recipe/item id?

in API Development

Posted by: xanthic.9478

xanthic.9478

If you grab the entire items endpoint there are a few items that have the same name/details:recipe_id etc. How am I supposed to know which entry is valid/correct?

EG “Recipe: Strawberry Ghost” (recipe id 6474) is used by two difference instances of the “Recipe: Strawberry Ghost” item.

https://api.guildwars2.com/v2/items?id=36102 (appears on TP)
https://api.guildwars2.com/v2/items?id=36120 (Account bound/etc, does not appear on TP)

And the recipe entry does not indicate which one is the correct one:
https://api.guildwars2.com/v2/recipes/6474

Are both entries ‘valid’? And then I should just code my recipe parser to choose the one that is least restricted?

Specific Recipe IDs that appear on more than 1 items:
Dupe item 6472.
Dupe item 6474.
Dupe item 6475.
Dupe item 7287.
Dupe item 7288.
Dupe item 7293.
Dupe item 7294.
Dupe item 7290.
Dupe item 7291.
Dupe item 11809.

Always Current Crafting Guides: http://gw2crafts.net
Updated every 20 minutes based on current TP prices.

Determining correct recipe/item id?

in API Development

Posted by: darthmaim.6017

darthmaim.6017

They are both valid, you can/could get both items in game. I don’t know what your script is supposed to do, but why not show all items unlocking a recipe?

Determining correct recipe/item id?

in API Development

Posted by: xanthic.9478

xanthic.9478

They are both valid, you can/could get both items in game. I don’t know what your script is supposed to do, but why not show all items unlocking a recipe?

I’m currently rewriting the code that generates gw2crafts.net and attempting to make as much of it as possible automated(for if/when anet updates recipes). This is post was probably more of a sanity check than anything as the api still lists recipes for things that were removed from the game(such as wooden sword) and recipe sheets that are unneeded(such as ascalon herb dressing or w/e and some meat plate that can be discovered if you don’t use the recipe) so I was just making sure that this is intentional behaviour without anything that I am missing.

Always Current Crafting Guides: http://gw2crafts.net
Updated every 20 minutes based on current TP prices.