class Tmdby::Movies

Public Class Methods

account_states(id, session_id) click to toggle source

This method lets a TMDb user account get the status of whether or not the movie has been rated or added to their favourite or movie watch list.

# File lib/tmdby/wrappers/movies.rb, line 14
def self.account_states(id, session_id)
  self.fetch "#{id}/account_states",
              session_id: session_id,
              authorized_params: ["session_id"]
end
alternative_titles(id, optional_params = {}) click to toggle source

Get the alternative titles for a specific movie id.

# File lib/tmdby/wrappers/movies.rb, line 21
def self.alternative_titles(id, optional_params = {})
  self.fetch "#{id}/alternative_titles",
              optional_params,
              authorized_params: ["country", "append_to_response"]
end
changes(id, optional_params = {}) click to toggle source

Get the changes for a specific movie id.

# File lib/tmdby/wrappers/movies.rb, line 91
def self.changes(id, optional_params = {})
  self.fetch "#{id}/changes",
              optional_params,
              authorized_params: ["start_date", "end_date", "page"]
end
credits(id, optional_params = {}) click to toggle source

Get the cast and crew information for a specific movie id.

# File lib/tmdby/wrappers/movies.rb, line 28
def self.credits(id, optional_params = {})
  self.fetch "#{id}/credits",
              optional_params,
              authorized_params: ["append_to_response"]
end
delete_rating(id, session_id, guest_session_id = nil) click to toggle source

This method lets users remove a movie rating.

# File lib/tmdby/wrappers/movies.rb, line 109
def self.delete_rating(id, session_id, guest_session_id = nil)
  self.fetch "#{id}/rating",
              method: 'delete',
              session_id: session_id,
              guest_session_id: guest_session_id,
              authorized_params: ["session_id", "guest_session_id"]
end
get(id, optional_params = {}) click to toggle source

Get the basic movie information for a specific movie id.

# File lib/tmdby/wrappers/movies.rb, line 7
def self.get(id, optional_params = {})
  self.fetch id,
              optional_params,
              authorized_params: ["language", "append_to_response"]
end
images(id, optional_params = {}) click to toggle source

Get the images (posters and backdrops) for a specific movie id.

# File lib/tmdby/wrappers/movies.rb, line 35
def self.images(id, optional_params = {})
  self.fetch "#{id}/images",
              optional_params,
              authorized_params: ["language", "append_to_response", "include_image_language"]
end
keywords(id, optional_params = {}) click to toggle source

Get the plot keywords for a specific movie id.

# File lib/tmdby/wrappers/movies.rb, line 42
def self.keywords(id, optional_params = {})
  self.fetch "#{id}/keywords",
              optional_params,
              authorized_params: ["append_to_response"]
end
latest() click to toggle source

Get the latest movie id.

# File lib/tmdby/wrappers/movies.rb, line 118
def self.latest
  self.fetch "latest"
end
lists(id, optional_params = {}) click to toggle source

Get the lists that the movie belongs to.

# File lib/tmdby/wrappers/movies.rb, line 84
def self.lists(id, optional_params = {})
  self.fetch "#{id}/lists",
              optional_params,
              authorized_params: ["page", "language", "append_to_response"]
end
now_playing(optional_params = {}) click to toggle source

Get the list of movies playing that have been, or are being released this week.

# File lib/tmdby/wrappers/movies.rb, line 130
def self.now_playing(optional_params = {})
  self.fetch "now_playing",
              optional_params,
              authorized_params: ["page", "language"]
end
rating(id, value, session_id, guest_session_id = nil) click to toggle source

This method lets users rate a movie.

# File lib/tmdby/wrappers/movies.rb, line 98
def self.rating(id, value, session_id, guest_session_id = nil)
  self.fetch "#{id}/rating",
              method: 'post',
              value: value,
              session_id: session_id,
              guest_session_id: guest_session_id,
              post_params: ["value"],
              authorized_params: ["session_id", "guest_session_id", "value"]
end
recommendations(id, optional_params = {}) click to toggle source

Get a list of recommended movies for a movie.

# File lib/tmdby/wrappers/movies.rb, line 151
def self.recommendations(id, optional_params = {})
  self.fetch "#{id}/recommendations",
              optional_params,
              authorized_params: ["language", "page"]
end
release_dates(id, optional_params = {}) click to toggle source

Get the release dates, certifications and related information by country for a specific movie id.

# File lib/tmdby/wrappers/movies.rb, line 49
def self.release_dates(id, optional_params = {})
  self.fetch "#{id}/release_dates",
              optional_params,
              authorized_params: ["append_to_response"]
end
reviews(id, optional_params = {}) click to toggle source

Get the reviews for a particular movie id.

# File lib/tmdby/wrappers/movies.rb, line 77
def self.reviews(id, optional_params = {})
  self.fetch "#{id}/reviews",
              optional_params,
              authorized_params: ["page", "language", "append_to_response"]
end
similar(id, optional_params = {}) click to toggle source

Get the similar movies for a specific movie id.

# File lib/tmdby/wrappers/movies.rb, line 70
def self.similar(id, optional_params = {})
  self.fetch "#{id}/similar",
              optional_params,
              authorized_params: ["page", "language", "append_to_response"]
end
top_rated(optional_params = {}) click to toggle source

Get the list of top rated movies.

# File lib/tmdby/wrappers/movies.rb, line 144
def self.top_rated(optional_params = {})
  self.fetch "top_rated",
              optional_params,
              authorized_params: ["page", "language"]
end
translations(id, optional_params = {}) click to toggle source

Get the translations for a specific movie id.

# File lib/tmdby/wrappers/movies.rb, line 63
def self.translations(id, optional_params = {})
  self.fetch "#{id}/translations",
              optional_params,
              authorized_params: ["append_to_response"]
end
upcoming(optional_params = {}) click to toggle source

Get the list of upcoming movies by release date.

# File lib/tmdby/wrappers/movies.rb, line 123
def self.upcoming(optional_params = {})
  self.fetch "upcoming",
              optional_params,
              authorized_params: ["page", "language"]
end
videos(id, optional_params = {}) click to toggle source

Get the videos (trailers, teasers, clips, etc…) for a specific movie id.

# File lib/tmdby/wrappers/movies.rb, line 56
def self.videos(id, optional_params = {})
  self.fetch "#{id}/videos",
              optional_params,
              authorized_params: ["language", "append_to_response"]
end