From ce67f877145f5fbe03d789fbf54cab8404d0b7f0 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 28 Aug 2013 00:16:21 -0400 Subject: [PATCH] added new remote control commands --- ApiClient.js | 36 ++++++++++++++++++++++++++++++++++++ packages.config | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/ApiClient.js b/ApiClient.js index 8a7db8b763..6262d760ec 100644 --- a/ApiClient.js +++ b/ApiClient.js @@ -3465,6 +3465,42 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) { }); }; + self.sendSystemCommand = function (sessionId, command) { + + if (!sessionId) { + throw new Error("null sessionId"); + } + + if (!command) { + throw new Error("null command"); + } + + var url = self.getUrl("Sessions/" + sessionId + "/System/" + command); + + return self.ajax({ + type: "POST", + url: url + }); + }; + + self.sendMessageCommand = function (sessionId, options) { + + if (!sessionId) { + throw new Error("null sessionId"); + } + + if (!options) { + throw new Error("null options"); + } + + var url = self.getUrl("Sessions/" + sessionId + "/Message", options); + + return self.ajax({ + type: "POST", + url: url + }); + }; + self.sendPlayStateCommand = function (sessionId, command, options) { if (!sessionId) { diff --git a/packages.config b/packages.config index 11c76e2059..9f7b690af2 100644 --- a/packages.config +++ b/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file