From 024df8a0116cf36290ad9abf876ea4d77da354b3 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 12 May 2013 02:05:51 -0400 Subject: [PATCH] display critic reviews on detail page --- MediaBrowser.Model/Entities/ItemReview.cs | 6 ------ MediaBrowser.WebDashboard/ApiClient.js | 26 +++++++++++++++++++++++ MediaBrowser.WebDashboard/packages.config | 2 +- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/MediaBrowser.Model/Entities/ItemReview.cs b/MediaBrowser.Model/Entities/ItemReview.cs index 3b496cce8e..e1a32aa119 100644 --- a/MediaBrowser.Model/Entities/ItemReview.cs +++ b/MediaBrowser.Model/Entities/ItemReview.cs @@ -48,11 +48,5 @@ namespace MediaBrowser.Model.Entities /// /// The caption. public string Caption { get; set; } - - /// - /// Gets or sets the text. - /// - /// The text. - public string Text { get; set; } } } diff --git a/MediaBrowser.WebDashboard/ApiClient.js b/MediaBrowser.WebDashboard/ApiClient.js index 999a7d9180..17f70a1d97 100644 --- a/MediaBrowser.WebDashboard/ApiClient.js +++ b/MediaBrowser.WebDashboard/ApiClient.js @@ -838,6 +838,32 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) { }); }; + self.getCriticReviews = function (itemId, options) { + + if (!itemId) { + throw new Error("null itemId"); + } + + var url = self.getUrl("Items/" + itemId + "/CriticReviews", options); + + return self.ajax({ + type: "GET", + url: url, + dataType: "json" + }); + }; + + self.getSessions = function (options) { + + var url = self.getUrl("Sessions", options); + + return self.ajax({ + type: "GET", + url: url, + dataType: "json" + }); + }; + /** * Uploads a user image * @param {String} userId diff --git a/MediaBrowser.WebDashboard/packages.config b/MediaBrowser.WebDashboard/packages.config index be16737802..d1529864bb 100644 --- a/MediaBrowser.WebDashboard/packages.config +++ b/MediaBrowser.WebDashboard/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file