aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Reports/ReportRequests.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2015-05-13 11:18:07 -0400
committerLuke <luke.pulverenti@gmail.com>2015-05-13 11:18:07 -0400
commitbaa59d900619f21e3bc76eb2acce15cfee7a87fb (patch)
treecbcf129afc5c2a8a31d8329680eac2a473d8f962 /MediaBrowser.Api/Reports/ReportRequests.cs
parent6aa3a37153d04de91799d9cfc792e1f503eefe95 (diff)
parentd3fd3e30d713e6f30c2ee2c1faa6930855951249 (diff)
Merge pull request #1086 from t-andre/dev
Report manager implementation
Diffstat (limited to 'MediaBrowser.Api/Reports/ReportRequests.cs')
-rw-r--r--MediaBrowser.Api/Reports/ReportRequests.cs70
1 files changed, 41 insertions, 29 deletions
diff --git a/MediaBrowser.Api/Reports/ReportRequests.cs b/MediaBrowser.Api/Reports/ReportRequests.cs
index 8dea00381..663d8f85c 100644
--- a/MediaBrowser.Api/Reports/ReportRequests.cs
+++ b/MediaBrowser.Api/Reports/ReportRequests.cs
@@ -1,33 +1,45 @@
-using ServiceStack;
+using MediaBrowser.Api.UserLibrary;
+using MediaBrowser.Controller.Net;
+using ServiceStack;
+using System.Collections.Generic;
namespace MediaBrowser.Api.Reports
{
- public class BaseReportRequest : IReturn<ReportResult>
- {
- /// <summary>
- /// Specify this to localize the search to a specific item or folder. Omit to use the root.
- /// </summary>
- /// <value>The parent id.</value>
- [ApiMember(Name = "ParentId", Description = "Specify this to localize the search to a specific item or folder. Omit to use the root", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
- public string ParentId { get; set; }
-
- /// <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; }
- }
-
- [Route("/Reports/Items", "GET", Summary = "Gets reports based on library items")]
- public class GetItemReport : BaseReportRequest
- {
- }
+ public class BaseReportRequest : GetItems
+ {
+ public bool HasQueryLimit { get; set; }
+ public string GroupBy { get; set; }
+
+ public string ReportColumns { get; set; }
+ }
+
+ [Route("/Reports/Items", "GET", Summary = "Gets reports based on library items")]
+ public class GetItemReport : BaseReportRequest, IReturn<ReportResult>
+ {
+
+ }
+
+ [Route("/Reports/Headers", "GET", Summary = "Gets reports headers based on library items")]
+ public class GetReportHeaders : BaseReportRequest, IReturn<List<ReportHeader>>
+ {
+ }
+
+ [Route("/Reports/Statistics", "GET", Summary = "Gets reports statistics based on library items")]
+ public class GetReportStatistics : BaseReportRequest, IReturn<ReportStatResult>
+ {
+ public int? TopItems { get; set; }
+
+ }
+
+ [Route("/Reports/Items/Download", "GET", Summary = "Downloads report")]
+ public class GetReportDownload : BaseReportRequest
+ {
+ public GetReportDownload()
+ {
+ ExportType = ReportExportType.CSV;
+ }
+
+ public ReportExportType ExportType { get; set; }
+ }
+
}