diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-12-17 15:02:12 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-12-17 15:02:12 -0500 |
| commit | 533a7b218d27683d1db42e57ff971fba190a1f08 (patch) | |
| tree | ceed803642f38791d09a005d6301bccc746c9b0b /MediaBrowser.WebDashboard/ApiClient.js | |
| parent | df1576c0393747cf84a4a4d3f4a93a8c032f5105 (diff) | |
add ability to create timer
Diffstat (limited to 'MediaBrowser.WebDashboard/ApiClient.js')
| -rw-r--r-- | MediaBrowser.WebDashboard/ApiClient.js | 58 |
1 files changed, 54 insertions, 4 deletions
diff --git a/MediaBrowser.WebDashboard/ApiClient.js b/MediaBrowser.WebDashboard/ApiClient.js index 53f4fde2a..a42c27949 100644 --- a/MediaBrowser.WebDashboard/ApiClient.js +++ b/MediaBrowser.WebDashboard/ApiClient.js @@ -389,13 +389,21 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi }); }; - self.getLiveTvChannel = function (id) { + self.getLiveTvChannel = function (id, userId) { if (!id) { throw new Error("null id"); } - var url = self.getUrl("LiveTv/Channels/" + id); + var options = { + + }; + + if (userId) { + options.userId = userId; + } + + var url = self.getUrl("LiveTv/Channels/" + id, options); return self.ajax({ type: "GET", @@ -437,13 +445,44 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi }); }; - self.getLiveTvRecording = function (id) { + self.getLiveTvRecording = function (id, userId) { if (!id) { throw new Error("null id"); } - var url = self.getUrl("LiveTv/Recordings/" + id); + var options = { + + }; + + if (userId) { + options.userId = userId; + } + + var url = self.getUrl("LiveTv/Recordings/" + id, options); + + return self.ajax({ + type: "GET", + url: url, + dataType: "json" + }); + }; + + self.getLiveTvProgram = function (id, userId) { + + if (!id) { + throw new Error("null id"); + } + + var options = { + + }; + + if (userId) { + options.userId = userId; + } + + var url = self.getUrl("LiveTv/Programs/" + id, options); return self.ajax({ type: "GET", @@ -506,6 +545,17 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi }); }; + self.getNewLiveTvTimerDefaults = function () { + + var url = self.getUrl("LiveTv/Timers/Defaults"); + + return self.ajax({ + type: "GET", + url: url, + dataType: "json" + }); + }; + self.createLiveTvTimer = function (item) { if (!item) { |
