From f286bd8242080628559c670eb92635e30fc1ced8 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 26 Mar 2013 00:33:47 -0400 Subject: [PATCH] update to latest js api client --- ApiClient.js | 42 ++++++++++++++++++++++++++++++++++++++++++ packages.config | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/ApiClient.js b/ApiClient.js index 5381a7abd4..0f014f8703 100644 --- a/ApiClient.js +++ b/ApiClient.js @@ -1516,6 +1516,48 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) { }); }; + /** + * Gets local trailers for an item + */ + self.getLocalTrailers = function (userId, itemId) { + + if (!userId) { + throw new Error("null userId"); + } + if (!itemId) { + throw new Error("null itemId"); + } + + var url = self.getUrl("Users/" + userId + "/Items/" + itemId + "/LocalTrailers"); + + return self.ajax({ + type: "GET", + url: url, + dataType: "json" + }); + }; + + /** + * Gets special features for an item + */ + self.getSpecialFeatures = function (userId, itemId) { + + if (!userId) { + throw new Error("null userId"); + } + if (!itemId) { + throw new Error("null itemId"); + } + + var url = self.getUrl("Users/" + userId + "/Items/" + itemId + "/SpecialFeatures"); + + return self.ajax({ + type: "GET", + url: url, + dataType: "json" + }); + }; + /** * Marks an item as played or unplayed * This should not be used to update playstate following playback. diff --git a/packages.config b/packages.config index 5599c176d5..f1726c0728 100644 --- a/packages.config +++ b/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file