class TMDb::Person

Constants

ATTRIBUTES

Public Class Methods

find(id, options = {}) click to toggle source

Public: Gets the basic person information for a specific person ID.

id - The ID of the person. options - The hash options used to filter the search (default: {}):

More information about the options, check the api documentation

Examples

TMDb::Person.find(138)
# File lib/tmdb-api/person.rb, line 19
def self.find(id, options = {})
  res = get("/person/#{id}", query: options)
  res.success? ? Person.new(res) : bad_response(res)
end
images(id) click to toggle source

Public: Gets the images for a specific person ID.

id - The person's ID

Examples

TMDb::Person.images(138)
# File lib/tmdb-api/person.rb, line 31
def self.images(id)
  res = get("/person/#{id}/images")
  res.success? ? res : bad_response(res)
end

Public Instance Methods

birthday() click to toggle source

Public: return the parsed birthday.

# File lib/tmdb-api/person.rb, line 56
def birthday
  Date.parse(@birthday) rescue nil
end
deathday() click to toggle source

Public: return the parsed deathday.

# File lib/tmdb-api/person.rb, line 61
def deathday
  Date.parse(@deathday) rescue nil
end