diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-04-11 23:50:47 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-04-11 23:50:47 -0400 |
| commit | 8fe7dfd4ce39d4bb3d9a96e3ada8783c26e291a2 (patch) | |
| tree | a471353c59811359375a32c1ecba1d9b0c3bd44f /MediaBrowser.WebDashboard/ApiClient.js | |
| parent | c3e3b68bb2e290d543c334716ca3a1127e54b484 (diff) | |
added people pages
Diffstat (limited to 'MediaBrowser.WebDashboard/ApiClient.js')
| -rw-r--r-- | MediaBrowser.WebDashboard/ApiClient.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/MediaBrowser.WebDashboard/ApiClient.js b/MediaBrowser.WebDashboard/ApiClient.js index f56d3744b..be4267d3c 100644 --- a/MediaBrowser.WebDashboard/ApiClient.js +++ b/MediaBrowser.WebDashboard/ApiClient.js @@ -1553,6 +1553,29 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) { }; /** + Gets people from an item + */ + self.getPeople = function (userId, options) { + + if (!userId) { + throw new Error("null userId"); + } + + var parentId = options.parentId || "root"; + + // Don't put these on the query string + delete options.parentId; + + var url = self.getUrl("Users/" + userId + "/Items/" + parentId + "/Persons", options); + + return self.ajax({ + type: "GET", + url: url, + dataType: "json" + }); + }; + + /** Gets studios from an item */ self.getStudios = function (userId, options) { |
