Class: BreakingBad::Character

Inherits:
MethodsRequest show all
Defined in:
lib/breaking_bad/endpoints/character.rb

Instance Method Summary collapse

Methods inherited from MethodsRequest

#all, #find, #initialize, #random

Constructor Details

This class inherits a constructor from BreakingBad::MethodsRequest

Instance Method Details

#find_by_category(category) ⇒ Object

Request characters by category, like ‘Breaking Bad’ or ‘Better Call Saul’.



6
7
8
# File 'lib/breaking_bad/endpoints/character.rb', line 6

def find_by_category(category)
  client.get("#{endpoint_name}?category=#{category}")
end

#find_by_name(name) ⇒ Object



14
15
16
# File 'lib/breaking_bad/endpoints/character.rb', line 14

def find_by_name(name)
  client.get("#{endpoint_name}?name=#{name}")
end

#find_with_limit(limit) ⇒ Object



10
11
12
# File 'lib/breaking_bad/endpoints/character.rb', line 10

def find_with_limit(limit)
  client.get("#{endpoint_name}?limit=#{limit}")
end