class MtgPricer::Pricer

Attributes

card[RW]
set[RW]

Public Class Methods

new(options = {}) click to toggle source
# File lib/mtg_pricer.rb, line 7
def initialize(options = {})
  @card = options || ''
  @set = options || ''
end

Public Instance Methods

cfb_price(card, set) click to toggle source
# File lib/mtg_pricer.rb, line 16
def cfb_price(card, set)
  @card = Unirest.get("http://magictcgprices.appspot.com/api/cfb/price.json?cardname=#{card}&cardset=#{set}").body
end
ebay_price(card, set) click to toggle source
# File lib/mtg_pricer.rb, line 20
def ebay_price(card, set)
  @card = Unirest.get("http://magictcgprices.appspot.com/api/ebay/price.json?cardname=#{card}&cardset=#{set}").body
end
tcgplayer_price(card, set) click to toggle source
# File lib/mtg_pricer.rb, line 12
def tcgplayer_price(card, set)
  @card = Unirest.get("http://magictcgprices.appspot.com/api/tcgplayer/price.json?cardname=#{card}&cardset=#{set}").body
end