class Tmdby::Tv

Public Class Methods

account_states(id, session_id) click to toggle source

This method lets users get the status of whether or not the TV show has been rated or added to their favourite or watch lists.

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

Get the list of TV shows that air today.

# File lib/tmdby/wrappers/tv.rb, line 122
def self.airing_today(optional_params = {})
  self.fetch "airing_today",
              optional_params,
              authorized_params: ["page", "language", "timezone"]
end
alternative_titles(id, optional_params = {}) click to toggle source

Get the alternative titles for a specific show ID.

# File lib/tmdby/wrappers/tv.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 TV show id.

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

Get the content ratings for a specific TV show id.

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

Get the cast & crew information about a TV series.

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

This method lets users delete a TV rating.

# File lib/tmdby/wrappers/tv.rb, line 81
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
external_ids(id, optional_params = {}) click to toggle source

Get the external ids that we have stored for a TV series.

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

Get the primary information about a TV series by id.

# File lib/tmdby/wrappers/tv.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 TV series.

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

Get the plot keywords for a specific TV show id.

# File lib/tmdby/wrappers/tv.rb, line 63
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 TV show id.

# File lib/tmdby/wrappers/tv.rb, line 110
def self.latest
  self.fetch "latest"
end
on_the_air(optional_params = {}) click to toggle source

Get the list of TV shows that are currently on the air.

# File lib/tmdby/wrappers/tv.rb, line 115
def self.on_the_air(optional_params = {})
  self.fetch "on_the_air",
              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 TV show.

# File lib/tmdby/wrappers/tv.rb, line 70
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 the list of TV show recommendations for this item.

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

Get the similar TV shows for a specific tv id.

# File lib/tmdby/wrappers/tv.rb, line 90
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 TV shows.

# File lib/tmdby/wrappers/tv.rb, line 129
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 list of translations that exist for a TV series.

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

Get the videos that have been added to a TV series (trailers, opening credits, etc…)

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