Class: HearthstoneApi::Cards

Inherits:
BaseModel show all
Defined in:
lib/hearthstone_api/cards.rb

Class Method Summary collapse

Methods included from Request

#get

Class Method Details

.all(options = {}) ⇒ Object



3
4
5
# File 'lib/hearthstone_api/cards.rb', line 3

def self.all(options = {})
  get "/cards", options
end

.classes(klass, options = {}) ⇒ Object



11
12
13
# File 'lib/hearthstone_api/cards.rb', line 11

def self.classes(klass, options = {})
  get "/cards/classes/#{klass.capitalize_all}", options
end

.factions(faction, options = {}) ⇒ Object



31
32
33
# File 'lib/hearthstone_api/cards.rb', line 31

def self.factions(faction, options = {})
  get "/cards/factions/#{faction.capitalize_all}", options
end

.qualities(quality, options = {}) ⇒ Object



27
28
29
# File 'lib/hearthstone_api/cards.rb', line 27

def self.qualities(quality, options = {})
  get "/cards/qualities/#{quality.capitalize_all}", options
end

.races(race, options = {}) ⇒ Object



23
24
25
# File 'lib/hearthstone_api/cards.rb', line 23

def self.races(race, options = {})
  get "/cards/races/#{race.capitalize_all}", options
end

.search(search_term) ⇒ Object



35
36
37
# File 'lib/hearthstone_api/cards.rb', line 35

def self.search(search_term)
  get "/cards/search/#{search_term}"
end

.sets(set, options = {}) ⇒ Object



19
20
21
# File 'lib/hearthstone_api/cards.rb', line 19

def self.sets(set, options = {})
  get "/cards/sets/#{set.capitalize_all}", options
end

.single(name_or_id, options = {}) ⇒ Object



7
8
9
# File 'lib/hearthstone_api/cards.rb', line 7

def self.single(name_or_id, options = {})
  get "/cards/#{name_or_id}", options
end

.type(type, options = {}) ⇒ Object



15
16
17
# File 'lib/hearthstone_api/cards.rb', line 15

def self.type(type, options = {})
  get "/cards/types/#{type.capitalize_all}", options
end