ReportRequests.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using MediaBrowser.Api.UserLibrary;
  2. using MediaBrowser.Controller.Net;
  3. using ServiceStack;
  4. using System.Collections.Generic;
  5. namespace MediaBrowser.Api.Reports
  6. {
  7. public class BaseReportRequest : GetItems
  8. {
  9. public bool HasQueryLimit { get; set; }
  10. public string GroupBy { get; set; }
  11. public string ReportColumns { get; set; }
  12. }
  13. [Route("/Reports/Items", "GET", Summary = "Gets reports based on library items")]
  14. public class GetItemReport : BaseReportRequest, IReturn<ReportResult>
  15. {
  16. }
  17. [Route("/Reports/Headers", "GET", Summary = "Gets reports headers based on library items")]
  18. public class GetReportHeaders : BaseReportRequest, IReturn<List<ReportHeader>>
  19. {
  20. }
  21. [Route("/Reports/Statistics", "GET", Summary = "Gets reports statistics based on library items")]
  22. public class GetReportStatistics : BaseReportRequest, IReturn<ReportStatResult>
  23. {
  24. public int? TopItems { get; set; }
  25. }
  26. [Route("/Reports/Items/Download", "GET", Summary = "Downloads report")]
  27. public class GetReportDownload : BaseReportRequest
  28. {
  29. public GetReportDownload()
  30. {
  31. ExportType = ReportExportType.CSV;
  32. }
  33. public ReportExportType ExportType { get; set; }
  34. }
  35. }