aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.WebDashboard/ApiClient.js
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.WebDashboard/ApiClient.js')
-rw-r--r--MediaBrowser.WebDashboard/ApiClient.js23
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) {