class MTG::Card
Attributes
artist[RW]
border[RW]
cmc[RW]
color_identity[RW]
colors[RW]
flavor[RW]
foreign_names[RW]
hand[RW]
id[RW]
image_url[RW]
layout[RW]
legalities[RW]
life[RW]
loyalty[RW]
mana_cost[RW]
multiverse_id[RW]
name[RW]
names[RW]
number[RW]
original_text[RW]
original_type[RW]
power[RW]
printings[RW]
rarity[RW]
release_date[RW]
reserved[RW]
rulings[RW]
set[RW]
set_name[RW]
source[RW]
starter[RW]
subtypes[RW]
supertypes[RW]
text[RW]
timeshifted[RW]
toughness[RW]
type[RW]
types[RW]
variations[RW]
watermark[RW]
Public Class Methods
Resource()
click to toggle source
Get the resource string
@return [String] The API resource string
# File lib/mtg_sdk/card.rb, line 17 def self.Resource "cards" end
all()
click to toggle source
Get all cards from a query by paging through data
@return [Array<Card>] Array of Card
objects
# File lib/mtg_sdk/card.rb, line 32 def self.all QueryBuilder.new(Card).all end
find(id)
click to toggle source
Find a single card by the card multiverse id
@param id [Integer] the multiverse id @return [Card] the Card
object response
# File lib/mtg_sdk/card.rb, line 25 def self.find(id) QueryBuilder.new(Card).find(id) end
where(args)
click to toggle source
Adds a parameter to the hash of query parameters
@param args [Hash] the query parameter @return [QueryBuilder] the QueryBuilder
# File lib/mtg_sdk/card.rb, line 40 def self.where(args) QueryBuilder.new(Card).where(args) end