aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.WebDashboard/ApiClient.js
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-17 10:52:02 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-17 10:52:02 -0400
commitc6fbb714c272aa5f78f1998fbcb14bc1c0edd0ff (patch)
tree70c94dffc9971b8646d7721cd35a29e265efef98 /MediaBrowser.WebDashboard/ApiClient.js
parentd59df69b5bd3a55099c356b2a34f3630ef9b8f00 (diff)
update to latest js api client
Diffstat (limited to 'MediaBrowser.WebDashboard/ApiClient.js')
-rw-r--r--MediaBrowser.WebDashboard/ApiClient.js66
1 files changed, 66 insertions, 0 deletions
diff --git a/MediaBrowser.WebDashboard/ApiClient.js b/MediaBrowser.WebDashboard/ApiClient.js
index fe361a868..420b75d93 100644
--- a/MediaBrowser.WebDashboard/ApiClient.js
+++ b/MediaBrowser.WebDashboard/ApiClient.js
@@ -1829,6 +1829,72 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
};
/**
+ Gets a variety of item counts that a person appears in
+ */
+ self.getPersonItemCounts = function (userId, name) {
+
+ if (!userId) {
+ throw new Error("null userId");
+ }
+
+ if (!name) {
+ throw new Error("null name");
+ }
+
+ var url = self.getUrl("Users/{UserId}/Persons/" + encodeName(name) + "/Counts");
+
+ return self.ajax({
+ type: "GET",
+ url: url,
+ dataType: "json"
+ });
+ };
+
+ /**
+ Gets a variety of item counts that a genre appears in
+ */
+ self.getGenreItemCounts = function (userId, name) {
+
+ if (!userId) {
+ throw new Error("null userId");
+ }
+
+ if (!name) {
+ throw new Error("null name");
+ }
+
+ var url = self.getUrl("Users/{UserId}/Genres/" + encodeName(name) + "/Counts");
+
+ return self.ajax({
+ type: "GET",
+ url: url,
+ dataType: "json"
+ });
+ };
+
+ /**
+ Gets a variety of item counts that a studio appears in
+ */
+ self.getStudiosItemCounts = function (userId, name) {
+
+ if (!userId) {
+ throw new Error("null userId");
+ }
+
+ if (!name) {
+ throw new Error("null name");
+ }
+
+ var url = self.getUrl("Users/{UserId}/Studios/" + encodeName(name) + "/Counts");
+
+ return self.ajax({
+ type: "GET",
+ url: url,
+ dataType: "json"
+ });
+ };
+
+ /**
* Clears a user's personal rating for an item
* @param {String} userId
* @param {String} itemId