From e57d5d4c50c4bcf7e36b4e7965c341dc8d7f311a Mon Sep 17 00:00:00 2001 From: David Ehlen Date: Tue, 29 Sep 2015 18:46:32 +0200 Subject: [PATCH] Added Endpoints for Show Videos and Similar Shows --- lib/endpoints.json | 2 ++ moviedb.js | 2 ++ moviedb.min.js | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/endpoints.json b/lib/endpoints.json index 0364616..281a87d 100644 --- a/lib/endpoints.json +++ b/lib/endpoints.json @@ -50,6 +50,8 @@ , "Credits" : { "resource": "tv/:id/credits", "method": "get" } , "ExternalIds" : { "resource": "tv/:id/external_ids", "method": "get" } , "Images" : { "resource": "tv/:id/images", "method": "get" } + , "Videos" : { "resource": "tv/:id/videos", "method": "get" } + , "Similar" : { "resource": "tv/:id/similar", "method": "get" } , "Translations" : { "resource": "tv/:id/translations", "method": "get" } , "SeasonInfo" : { "resource": "tv/:id/season/:season_number", "method": "get" } , "SeasonCredits" : { "resource": "tv/:id/season/:season_number/credits", "method": "get" } diff --git a/moviedb.js b/moviedb.js index 54cb9f8..3effdd9 100644 --- a/moviedb.js +++ b/moviedb.js @@ -55,6 +55,8 @@ module.exports={ , "Credits" : { "resource": "tv/:id/credits", "method": "get" } , "ExternalIds" : { "resource": "tv/:id/external_ids", "method": "get" } , "Images" : { "resource": "tv/:id/images", "method": "get" } + , "Videos" : { "resource": "tv/:id/videos", "method": "get" } + , "Similar" : { "resource": "tv/:id/similar", "method": "get" } , "Translations" : { "resource": "tv/:id/translations", "method": "get" } , "SeasonInfo" : { "resource": "tv/:id/season/:season_number", "method": "get" } , "SeasonCredits" : { "resource": "tv/:id/season/:season_number/credits", "method": "get" } diff --git a/moviedb.min.js b/moviedb.min.js index 4f851bb..f473971 100644 --- a/moviedb.min.js +++ b/moviedb.min.js @@ -1 +1 @@ -(function(e){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=e()}else if(typeof define==="function"&&define.amd){define([],e)}else{var t;if(typeof window!=="undefined"){t=window}else if(typeof global!=="undefined"){t=global}else if(typeof self!=="undefined"){t=self}else{t=this}t.MDB=e()}})(function(){var e,t,r;return function o(e,t,r){function i(n,a){if(!t[n]){if(!e[n]){var u=typeof require=="function"&&require;if(!a&&u)return u(n,!0);if(s)return s(n,!0);var c=new Error("Cannot find module '"+n+"'");throw c.code="MODULE_NOT_FOUND",c}var h=t[n]={exports:{}};e[n][0].call(h.exports,function(t){var r=e[n][1][t];return i(r?r:t)},h,h.exports,o,e,t,r)}return t[n].exports}var s=typeof require=="function"&&require;for(var n=0;n+new Date(this.token.expires_at)){this.requestToken(function(){n.call(i,t[r].method,e,t[r].resource,o)})}else{n.call(this,t[r].method,e,t[r].resource,o)}return this}})});var n=function(e,t,r,s){t=t||{};r=r.replace(":id",t.id).replace(":season_number",t.season_number).replace(":episode_number",t.episode_number);e=e.toUpperCase();var n=o(e,i.base_url+r).query({api_key:this.api_key}).set("Accept","application/json");if(e==="GET")n.query(t);else n.send(t);n.end(function(e){if(e.ok)s(null,e.body);else s(e.error,null)});n.on("error",s)}},{"./endpoints.json":2,superagent:4}],4:[function(e,t,r){var o=e("emitter");var i=e("reduce");var s="undefined"==typeof window?this:window;function n(){}function a(e){var t={}.toString.call(e);switch(t){case"[object File]":case"[object Blob]":case"[object FormData]":return true;default:return false}}function u(){if(s.XMLHttpRequest&&("file:"!=s.location.protocol||!s.ActiveXObject)){return new XMLHttpRequest}else{try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}}return false}var c="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function h(e){return e===Object(e)}function d(e){if(!h(e))return e;var t=[];for(var r in e){if(null!=e[r]){t.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r]))}}return t.join("&")}y.serializeObject=d;function l(e){var t={};var r=e.split("&");var o;var i;for(var s=0,n=r.length;s+new Date(this.token.expires_at)){this.requestToken(function(){n.call(i,t[r].method,e,t[r].resource,o)})}else{n.call(this,t[r].method,e,t[r].resource,o)}return this}})});var n=function(e,t,r,s){t=t||{};r=r.replace(":id",t.id).replace(":season_number",t.season_number).replace(":episode_number",t.episode_number);e=e.toUpperCase();var n=o(e,i.base_url+r).query({api_key:this.api_key}).set("Accept","application/json");if(e==="GET")n.query(t);else n.send(t);n.end(function(e){if(e.ok)s(null,e.body);else s(e.error,null)});n.on("error",s)}},{"./endpoints.json":2,superagent:4}],4:[function(e,t,r){var o=e("emitter");var i=e("reduce");var s="undefined"==typeof window?this:window;function n(){}function a(e){var t={}.toString.call(e);switch(t){case"[object File]":case"[object Blob]":case"[object FormData]":return true;default:return false}}function u(){if(s.XMLHttpRequest&&("file:"!=s.location.protocol||!s.ActiveXObject)){return new XMLHttpRequest}else{try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}}return false}var c="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function h(e){return e===Object(e)}function d(e){if(!h(e))return e;var t=[];for(var r in e){if(null!=e[r]){t.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r]))}}return t.join("&")}y.serializeObject=d;function l(e){var t={};var r=e.split("&");var o;var i;for(var s=0,n=r.length;s