Class: Tmdb::Person

Inherits:
Resource show all
Defined in:
lib/themoviedb/person.rb

Constant Summary collapse

@@fields =
[
  :adult,
  :also_known_as,
  :biography,
  :birthday,
  :deathday,
  :homepage,
  :id,
  :name,
  :place_of_birth,
  :profile_path,
  :movie_credits,
  :tv_credits,
  :combined_credits,
  :images,
  :changes
]

Class Method Summary collapse

Methods inherited from Resource

detail, endpoint_id, endpoints, has_resource, #initialize, list, search

Constructor Details

This class inherits a constructor from Tmdb::Resource

Class Method Details

.changes(id, conditions = {}) ⇒ Object

Get the changes for a specific person id. Changes are grouped by key, and ordered by date in descending order. By default, only the last 24 hours of changes are returned. The maximum number of days that can be returned in a single request is 14. The language is present on fields that are translatable.


80
81
82
83
# File 'lib/themoviedb/person.rb', line 80

def self.changes(id, conditions={})
  search = Tmdb::Search.new("/#{self.endpoints[:singular]}/#{self.endpoint_id + id.to_s}/changes")
  search.fetch_response
end

.credits(id, conditions = {}) ⇒ Object

Get the combined credits for a specific person id.


41
42
43
44
# File 'lib/themoviedb/person.rb', line 41

def self.credits(id, conditions={})
  search = Tmdb::Search.new("/#{self.endpoints[:singular]}/#{self.endpoint_id + id.to_s}/combined_credits")
  search.fetch_response
end

.external_ids(id, conditions = {}) ⇒ Object

Get external ID's for a specific person id.


59
60
61
62
# File 'lib/themoviedb/person.rb', line 59

def self.external_ids(id, conditions={})
  search = Tmdb::Search.new("/#{self.endpoints[:singular]}/#{self.endpoint_id + id.to_s}/external_ids")
  search.fetch_response
end

.images(id, conditions = {}) ⇒ Object

Get the images for a specific person id.


65
66
67
68
# File 'lib/themoviedb/person.rb', line 65

def self.images(id, conditions={})
  search = Tmdb::Search.new("/#{self.endpoints[:singular]}/#{self.endpoint_id + id.to_s}/images")
  search.fetch_response
end

.latestObject

Get the latest person id.


35
36
37
38
# File 'lib/themoviedb/person.rb', line 35

def self.latest
  search = Tmdb::Search.new("/#{self.endpoints[:singular]}/latest")
  search.fetch_response
end

.movie_credits(id, conditions = {}) ⇒ Object

Get film credits for a specific person id.


47
48
49
50
# File 'lib/themoviedb/person.rb', line 47

def self.movie_credits(id, conditions={})
  search = Tmdb::Search.new("/#{self.endpoints[:singular]}/#{self.endpoint_id + id.to_s}/movie_credits")
  search.fetch_response
end

Get the list of popular people on The Movie Database. This list refreshes every day.


29
30
31
32
# File 'lib/themoviedb/person.rb', line 29

def self.popular
  search = Tmdb::Search.new("/#{self.endpoints[:singular]}/popular")
  search.fetch
end

.tagged_images(id, conditions = {}) ⇒ Object

Get the tagged images for a specific person id.


71
72
73
74
# File 'lib/themoviedb/person.rb', line 71

def self.tagged_images(id, conditions={})
  search = Tmdb::Search.new("/#{self.endpoints[:singular]}/#{self.endpoint_id + id.to_s}/tagged_images")
  search.fetch_response
end

.tv_credits(id, conditions = {}) ⇒ Object

Get TV credits for a specific person id.


53
54
55
56
# File 'lib/themoviedb/person.rb', line 53

def self.tv_credits(id, conditions={})
  search = Tmdb::Search.new("/#{self.endpoints[:singular]}/#{self.endpoint_id + id.to_s}/tv_credits")
  search.fetch_response
end