kihashi / mtg-irc

A module for the IRC Bot Phenny that allows users to query magic cards.
3 stars 1 forks source link

Refactor Eprice #50

Closed kihashi closed 9 years ago

kihashi commented 10 years ago
  1. Use the database.
  2. Update the DB no more than once per day.

I don't think that you can link the mtgoprice table to CardRelease or Expansion because he abbreviations are not guaranteed to be standard as well as there being online only sets.

So the db table will look like:

card = Card(ManyToOne)
expansion = String
price = float

I am not going to implement foil pricing at this time.

kihashi commented 10 years ago

I have added a parser for it. Each CardRelease has an associated MTGOPrice object. I was able to do this by adding edition searching by old code and gatherer code. The price list seems to use a mixture of both, so now edition searching searches code, then gatherer code, then old code.

I still need to figure out how to deal with promo cards and sets like vintage masters and theme decks.

kihashi commented 10 years ago

Forgot to mention, it also does not deal with split cards at the moment.

kihashi commented 10 years ago

I added the bot command for it. Also fixed a problem where the prices were not being committed to the DB.

kihashi commented 9 years ago

I added a 4th MTGO Code for sets, so now you can search by that too. These had to be added manually in the build process from a dictionary file for the few sets that had odd codes.