From 12112ea25da848d6677a5e4b8582cd5c50aeb981 Mon Sep 17 00:00:00 2001 From: Andrew Rabert Date: Sun, 6 Jan 2019 17:52:51 -0500 Subject: [PATCH] Remove more news --- .../ApplicationHost.cs | 1 - MediaBrowser.Api/NewsService.cs | 46 ------------------- MediaBrowser.Model/News/INewsService.cs | 17 ------- MediaBrowser.Model/News/NewsItem.cs | 14 ------ MediaBrowser.Model/News/NewsQuery.cs | 9 ---- 5 files changed, 87 deletions(-) delete mode 100644 MediaBrowser.Api/NewsService.cs delete mode 100644 MediaBrowser.Model/News/INewsService.cs delete mode 100644 MediaBrowser.Model/News/NewsItem.cs delete mode 100644 MediaBrowser.Model/News/NewsQuery.cs diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 950ae10c7..54bce70ca 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -80,7 +80,6 @@ using MediaBrowser.Model.Globalization; using MediaBrowser.Model.IO; using MediaBrowser.Model.MediaInfo; using MediaBrowser.Model.Net; -using MediaBrowser.Model.News; using MediaBrowser.Model.Reflection; using MediaBrowser.Model.Serialization; using MediaBrowser.Model.Services; diff --git a/MediaBrowser.Api/NewsService.cs b/MediaBrowser.Api/NewsService.cs deleted file mode 100644 index cbc77bfc9..000000000 --- a/MediaBrowser.Api/NewsService.cs +++ /dev/null @@ -1,46 +0,0 @@ -using MediaBrowser.Model.News; -using MediaBrowser.Model.Querying; -using MediaBrowser.Model.Services; - -namespace MediaBrowser.Api -{ - [Route("/News/Product", "GET", Summary = "Gets the latest product news.")] - public class GetProductNews : IReturn> - { - /// - /// Skips over a given number of items within the results. Use for paging. - /// - /// The start index. - [ApiMember(Name = "StartIndex", Description = "Optional. The record index to start at. All items with a lower index will be dropped from the results.", IsRequired = false, DataType = "int", ParameterType = "query", Verb = "GET")] - public int? StartIndex { get; set; } - - /// - /// The maximum number of items to return - /// - /// The limit. - [ApiMember(Name = "Limit", Description = "Optional. The maximum number of records to return", IsRequired = false, DataType = "int", ParameterType = "query", Verb = "GET")] - public int? Limit { get; set; } - } - - public class NewsService : BaseApiService - { - private readonly INewsService _newsService; - - public NewsService(INewsService newsService) - { - _newsService = newsService; - } - - public object Get(GetProductNews request) - { - var result = _newsService.GetProductNews(new NewsQuery - { - StartIndex = request.StartIndex, - Limit = request.Limit - - }); - - return ToOptimizedResult(result); - } - } -} diff --git a/MediaBrowser.Model/News/INewsService.cs b/MediaBrowser.Model/News/INewsService.cs deleted file mode 100644 index 4c92664d9..000000000 --- a/MediaBrowser.Model/News/INewsService.cs +++ /dev/null @@ -1,17 +0,0 @@ -using MediaBrowser.Model.Querying; - -namespace MediaBrowser.Model.News -{ - /// - /// Interface INewsFeed - /// - public interface INewsService - { - /// - /// Gets the product news. - /// - /// The query. - /// QueryResult{NewsItem}. - QueryResult GetProductNews(NewsQuery query); - } -} diff --git a/MediaBrowser.Model/News/NewsItem.cs b/MediaBrowser.Model/News/NewsItem.cs deleted file mode 100644 index 2a05c420a..000000000 --- a/MediaBrowser.Model/News/NewsItem.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace MediaBrowser.Model.News -{ - public class NewsItem - { - public string Title { get; set; } - public string Link { get; set; } - public string Description { get; set; } - public string DescriptionHtml { get; set; } - public string Guid { get; set; } - public DateTime Date { get; set; } - } -} diff --git a/MediaBrowser.Model/News/NewsQuery.cs b/MediaBrowser.Model/News/NewsQuery.cs deleted file mode 100644 index 567888921..000000000 --- a/MediaBrowser.Model/News/NewsQuery.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace MediaBrowser.Model.News -{ - public class NewsQuery - { - public int? StartIndex { get; set; } - - public int? Limit { get; set; } - } -} \ No newline at end of file