From b9d17c9bc765a0c59d81db6277300a6860bf8421 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 1 Jan 2014 13:26:31 -0500 Subject: add more methods to file system interface --- MediaBrowser.WebDashboard/ApiClient.js | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'MediaBrowser.WebDashboard/ApiClient.js') diff --git a/MediaBrowser.WebDashboard/ApiClient.js b/MediaBrowser.WebDashboard/ApiClient.js index 274be16b9..592cf2bad 100644 --- a/MediaBrowser.WebDashboard/ApiClient.js +++ b/MediaBrowser.WebDashboard/ApiClient.js @@ -872,6 +872,47 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi }); }; + /** + * Gets shares from a network device + */ + self.getNetworkShares = function (path) { + + if (!path) { + throw new Error("null path"); + } + + var options = {}; + options.path = path; + + var url = self.getUrl("Environment/NetworkShares", options); + + return self.ajax({ + type: "GET", + url: url, + dataType: "json" + }); + }; + + /** + * Gets the parent of a given path + */ + self.getParentPath = function (path) { + + if (!path) { + throw new Error("null path"); + } + + var options = {}; + options.path = path; + + var url = self.getUrl("Environment/ParentPath", options); + + return self.ajax({ + type: "GET", + url: url + }); + }; + /** * Gets a list of physical drives from the server */ -- cgit v1.2.3