Class: TvMaze::Person

Inherits:
ApiResource show all
Defined in:
lib/tv_maze/models/person.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.find(id, embed: []) ⇒ Object



3
4
5
# File 'lib/tv_maze/models/person.rb', line 3

def self.find(id, embed: [])
  build_single_resource(TvMaze::Requester.get("people/#{id}", {embed: embed}), TvMaze::PersonRepresenter)
end

.search(query) ⇒ Object



15
16
17
18
# File 'lib/tv_maze/models/person.rb', line 15

def self.search(query)
  result = TvMaze::Requester.get("search/people", {q: query})
  build_collection(result.map{|show| show['person'] }, TvMaze::PersonRepresenter)
end

Instance Method Details

#cast_credits(id, embed: []) ⇒ Object



7
8
9
# File 'lib/tv_maze/models/person.rb', line 7

def cast_credits(id, embed: [])
  #"people/#{id}/castcredits"
end

#crew_credits(id) ⇒ Object



11
12
13
# File 'lib/tv_maze/models/person.rb', line 11

def crew_credits(id)

end