-
Notifications
You must be signed in to change notification settings - Fork 104
Lists
getById(options, parameter1, parameter2)
This method allows you to get a list by id, it accepts three parameters, the first one must be an object that must have a list id, the other two parameters must be functions and will be used as callbacks for the request.
See the allowed options here.
Call the method:
theMovieDb.lists.getById({"id":"509ec17b19c2950a0600050d" }, successCB, errorCB)
getStatusById(options, parameter1, parameter2)
This method allows you to check if a movie ID is already added to a list, it accepts three parameters, the first one must be an object that must have a list id and a movie_id, the other two parameters must be functions and will be used as callbacks for the request.
See the allowed options here.
Call the method:
theMovieDb.lists.getStatusById({"id":"509ec17b19c2950a0600050d", "movie_id":76203 }, successCB, errorCB)
addList(options, parameter1, parameter2)
This method allows you to create a new list, it accepts three parameters, the first one must be an object that must have a session_id, a name, a description and could have a language field (ISO 639-1 code), the other two parameters must be functions and will be used as callbacks for the request.
See the allowed options here.
Call the method:
theMovieDb.lists.addList({"session_id": <session_id>, "name": "My List", "description": "My description"}, successCB, errorCB)
addItem(options, parameter1, parameter2)
This method allows you to add an item to a list, it accepts three parameters, the first one must be an object that must have a session_id, a list id, and a movie id, the other two parameters must be functions and will be used as callbacks for the request.
See the allowed options here.
Call the method:
theMovieDb.lists.addItem({"session_id": <session-id>, "id": <list-id>, "media_id": <movie-id>}, successCB, errorCB)
removeItem(options, parameter1, parameter2)
This method allows you to remove an item from a list, it accepts three parameters, the first one must be an object that must have a session_id, a list id, and a movie id, the other two parameters must be functions and will be used as callbacks for the request.
See the allowed options here.
Call the method:
theMovieDb.lists.removeItem({"session_id": <session-id>, "id": <list-id>, "media_id": <movie-id>}, successCB, errorCB)
clearList(options, parameter1, parameter2)
This method allows you to clear all the items from a list, it accepts three parameters, the first one must be an object that must have a confirm key with a falue of true or false, a session id and a list id, the other two parameters must be functions and will be used as callbacks for the request.
See the allowed options here.
Call the method:
theMovieDb.lists.clearList({"session_id": <session-id>, "id": <list-id>, "confirm": true}, successCB, errorCB)
removeList(options, parameter1, parameter2)
This method allows you to remove a list, it accepts three parameters, the first one must be an object that must have a session id and a list id, the other two parameters must be functions and will be used as callbacks for the request.
See the allowed options here.
Call the method:
theMovieDb.lists.removeList({"session_id": <session-id>, "id": <list-id>}, successCB, errorCB)