class Traktr::Show::Episode
Public Instance Methods
comments(title, season, episode)
click to toggle source
# File lib/traktr/show/episode.rb, line 4 def comments(title, season, episode) parse_response self.class.get("/" + File.join("comments.json", @client.api_key, title, season.to_s, episode.to_s)) end
library(show, episodes)
click to toggle source
# File lib/traktr/show/episode.rb, line 20 def library(show, episodes) data = { username: @client.username, password: @client.password, title: show.title, year: show.year, imdb_id: show.imdb_id, tvdb_id: show.tvdb_id, episodes: episodes.collect{ |e| { season: e.season, episode: e.episode } } } parse_response self.class.post("/" + File.join("library", @client.api_key), body: data.to_json, headers: { 'Content-Type' => 'application/json'}) end
seen(show, episodes)
click to toggle source
# File lib/traktr/show/episode.rb, line 38 def seen(show, episodes) data = { username: @client.username, password: @client.password, title: show.title, year: show.year, imdb_id: show.imdb_id, tvdb_id: show.tvdb_id, episodes: episodes.collect{ |e| { season: e.season, episode: e.episode } } } parse_response self.class.post("/" + File.join("seen", @client.api_key), body: data.to_json, headers: { 'Content-Type' => 'application/json'}) end
stats(title, season, episode)
click to toggle source
# File lib/traktr/show/episode.rb, line 8 def stats(title, season, episode) parse_response self.class.get("/" + File.join("stats.json", @client.api_key, title, season.to_s, episode.to_s)) end
summary(title, season, episode)
click to toggle source
# File lib/traktr/show/episode.rb, line 12 def summary(title, season, episode) parse_response self.class.get("/" + File.join("summary.json", @client.api_key, title, season.to_s, episode.to_s)) end
unlibrary(show, episodes)
click to toggle source
# File lib/traktr/show/episode.rb, line 29 def unlibrary(show, episodes) data = { username: @client.username, password: @client.password, title: show.title, year: show.year, imdb_id: show.imdb_id, tvdb_id: show.tvdb_id, episodes: episodes.collect{ |e| { season: e.season, episode: e.episode } } } parse_response self.class.post("/" + File.join("unlibrary", @client.api_key), body: data.to_json, headers: { 'Content-Type' => 'application/json'}) end
unseen(show, episodes)
click to toggle source
# File lib/traktr/show/episode.rb, line 47 def unseen(show, episodes) data = { username: @client.username, password: @client.password, title: show.title, year: show.year, imdb_id: show.imdb_id, tvdb_id: show.tvdb_id, episodes: episodes.collect{ |e| { season: e.season, episode: e.episode } } } parse_response self.class.post("/" + File.join("unseen", @client.api_key), body: data.to_json, headers: { 'Content-Type' => 'application/json'}) end
unwatchlist(show, episodes)
click to toggle source
# File lib/traktr/show/episode.rb, line 65 def unwatchlist(show, episodes) data = { username: @client.username, password: @client.password, title: show.title, year: show.year, imdb_id: show.imdb_id, tvdb_id: show.tvdb_id, episodes: episodes.collect{ |e| { season: e.season, episode: e.episode } } } parse_response self.class.post("/" + File.join("unwatchlist", @client.api_key), body: data.to_json, headers: { 'Content-Type' => 'application/json'}) end
watchingnow(title, season, episode)
click to toggle source
# File lib/traktr/show/episode.rb, line 16 def watchingnow(title, season, episode) parse_response self.class.get("/" + File.join("watchingnow.json", @client.api_key, title, season.to_s, episode.to_s)) end
watchlist(show, episodes)
click to toggle source
# File lib/traktr/show/episode.rb, line 56 def watchlist(show, episodes) data = { username: @client.username, password: @client.password, title: show.title, year: show.year, imdb_id: show.imdb_id, tvdb_id: show.tvdb_id, episodes: episodes.collect{ |e| { season: e.season, episode: e.episode } } } parse_response self.class.post("/" + File.join("watchlist", @client.api_key), body: data.to_json, headers: { 'Content-Type' => 'application/json'}) end