Closed jbhannah closed 11 years ago
What's the value of multiverse_id
beyond determining gatherer_url
and image_url
(which are included in the response)?
One example would be using Tutor to seed a card database, and wanting to associate a specific version of a card with the set it belongs to. Another would be a collection management application that uses Tutor directly, and tracking quantities of card versions specific to a set from a page of cards in that set as returned by GET /set/:name(/:page)
.
Tutor needn't do this, necessarily, since extracting multiverse_id
from gatherer_url
is relatively easy:
multiverse_id = +/multiverseid=(\d+)/.exec(card.gatherer_url)[1]
In order for this pull request to be accepted…
multiverse_id
should also be included for cards retrieved by idmultiverse_id
should be mentioned in the READMEYou may decide that it's less work to extract this information in your application than to make these changes to Tutor. ;)
I was just today starting a branch about database support, so I can definitely see the use of reusing Gatherer's unique identifiers, but I agree with all of David's points: update the tests, and keep the /card and /set responses consistently structured.
Challenge accepted. Give me a few days, my fall semester starts this week so I'm a bit swamped at the moment.
The repository's layout has changed beyond recognition since this pull request was created. I'm still open to such a change, but it'll need a new pull request.
In
GET /set/:name(/:page)
it might be useful to know the multiverse ID of a card's specific version that is included in that set, without having to parse that card's versions. This is as opposed to requesting a card by its multiverse ID, in which case the multiverse ID is already known; or requesting a card by its name, without caring about a specific version and being able to see all of the versions with their multiverse IDs.