diff options
| author | Bond-009 <bond.009@outlook.com> | 2019-01-16 19:10:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-16 19:10:42 +0100 |
| commit | 900dc851e6c810f9e1772a6fb901a5a7e2801baf (patch) | |
| tree | 205bac3cd6df971ee18739e59bd4da0ffe91718b /MediaBrowser.Api/NewsService.cs | |
| parent | 07a8e49c4b1e4a2dddbaa49ab6f1ff4f271fbf20 (diff) | |
| parent | 933ef438894ed233fec46badf58dd4f26492e832 (diff) | |
Merge branch 'dev' into cleanup
Diffstat (limited to 'MediaBrowser.Api/NewsService.cs')
| -rw-r--r-- | MediaBrowser.Api/NewsService.cs | 46 |
1 files changed, 0 insertions, 46 deletions
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<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); - } - } -} |
