class Tmdby::Lists
Public Class Methods
add_item(id, session_id, media_id)
click to toggle source
This method lets users add new movies to a list that they created.
# File lib/tmdby/wrappers/lists.rb, line 39 def self.add_item(id, session_id, media_id) self.fetch "#{id}/add_item", method: 'post', media_id: media_id, session_id: session_id, post_params: ["media_id"], authorized_params: ["session_id", "media_id"] end
clear(id, session_id, confirm = true)
click to toggle source
Clear all of the items within a list.
# File lib/tmdby/wrappers/lists.rb, line 59 def self.clear(id, session_id, confirm = true) self.fetch "#{id}/clear", method: 'post', session_id: session_id, confirm: confirm, authorized_params: ["session_id", "confirm"] end
delete(id, session_id)
click to toggle source
Delete a list by id.
# File lib/tmdby/wrappers/lists.rb, line 12 def self.delete(id, session_id) self.fetch id, method: "delete", session_id: session_id, authorized_params: ["session_id"] end
get(id)
click to toggle source
Get a list by id.
# File lib/tmdby/wrappers/lists.rb, line 7 def self.get(id) self.fetch id end
item_status(id, movie_id)
click to toggle source
Check to see if a movie ID is already added to a list.
# File lib/tmdby/wrappers/lists.rb, line 20 def self.item_status(id, movie_id) self.fetch "#{id}/item_status", movie_id: movie_id, authorized_params: ["movie_id"] end
new(session_id, name, description, optional_params = {})
click to toggle source
This method lets users create a new list.
# File lib/tmdby/wrappers/lists.rb, line 27 def self.new(session_id, name, description, optional_params = {}) self.fetch "", optional_params, method: 'post', session_id: session_id, name: name, description: description, post_params: ["name", "description", "language"], authorized_params: ["session_id", "name", "description", "language"] end
remove_item(id, session_id, media_id)
click to toggle source
This method lets users delete movies from a list that they created.
# File lib/tmdby/wrappers/lists.rb, line 49 def self.remove_item(id, session_id, media_id) self.fetch "#{id}/remove_item", method: 'post', media_id: media_id, session_id: session_id, post_params: ["media_id"], authorized_params: ["session_id", "media_id"] end