From 8fe7dfd4ce39d4bb3d9a96e3ada8783c26e291a2 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 11 Apr 2013 23:50:47 -0400 Subject: added people pages --- MediaBrowser.WebDashboard/ApiClient.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'MediaBrowser.WebDashboard/ApiClient.js') 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 @@ -1552,6 +1552,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 */ -- cgit v1.2.3