Merge pull request #461 from nvllsvm/old_news

Remove more news
pull/1154/head
Andrew Rabert 6 years ago committed by GitHub
commit 1dde747267

@ -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;

@ -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<QueryResult<NewsItem>>
{
/// <summary>
/// Skips over a given number of items within the results. Use for paging.
/// </summary>
/// <value>The start index.</value>
[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; }
/// <summary>
/// The maximum number of items to return
/// </summary>
/// <value>The limit.</value>
[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);
}
}
}

@ -1,17 +0,0 @@
using MediaBrowser.Model.Querying;
namespace MediaBrowser.Model.News
{
/// <summary>
/// Interface INewsFeed
/// </summary>
public interface INewsService
{
/// <summary>
/// Gets the product news.
/// </summary>
/// <param name="query">The query.</param>
/// <returns>QueryResult{NewsItem}.</returns>
QueryResult<NewsItem> GetProductNews(NewsQuery query);
}
}

@ -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; }
}
}

@ -1,9 +0,0 @@
namespace MediaBrowser.Model.News
{
public class NewsQuery
{
public int? StartIndex { get; set; }
public int? Limit { get; set; }
}
}
Loading…
Cancel
Save