ItemQuery.cs 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. using MediaBrowser.Model.Dto;
  2. using MediaBrowser.Model.Entities;
  3. using System;
  4. namespace MediaBrowser.Model.Querying
  5. {
  6. /// <summary>
  7. /// Contains all the possible parameters that can be used to query for items
  8. /// </summary>
  9. public class ItemQuery
  10. {
  11. /// <summary>
  12. /// The user to localize search results for
  13. /// </summary>
  14. /// <value>The user id.</value>
  15. public Guid UserId { get; set; }
  16. /// <summary>
  17. /// Specify this to localize the search to a specific item or folder. Omit to use the root.
  18. /// </summary>
  19. /// <value>The parent id.</value>
  20. public string ParentId { get; set; }
  21. /// <summary>
  22. /// Skips over a given number of items within the results. Use for paging.
  23. /// </summary>
  24. /// <value>The start index.</value>
  25. public int? StartIndex { get; set; }
  26. /// <summary>
  27. /// The maximum number of items to return
  28. /// </summary>
  29. /// <value>The limit.</value>
  30. public int? Limit { get; set; }
  31. /// <summary>
  32. /// What to sort the results by
  33. /// </summary>
  34. /// <value>The sort by.</value>
  35. public string[] SortBy { get; set; }
  36. /// <summary>
  37. /// The sort order to return results with
  38. /// </summary>
  39. /// <value>The sort order.</value>
  40. public SortOrder? SortOrder { get; set; }
  41. /// <summary>
  42. /// Filters to apply to the results
  43. /// </summary>
  44. /// <value>The filters.</value>
  45. public ItemFilter[] Filters { get; set; }
  46. /// <summary>
  47. /// Fields to return within the items, in addition to basic information
  48. /// </summary>
  49. /// <value>The fields.</value>
  50. public ItemFields[] Fields { get; set; }
  51. /// <summary>
  52. /// Gets or sets the media types.
  53. /// </summary>
  54. /// <value>The media types.</value>
  55. public string[] MediaTypes { get; set; }
  56. /// <summary>
  57. /// Gets or sets the video formats.
  58. /// </summary>
  59. /// <value>The video formats.</value>
  60. public VideoFormat[] VideoFormats { get; set; }
  61. /// <summary>
  62. /// Gets or sets the video types.
  63. /// </summary>
  64. /// <value>The video types.</value>
  65. public VideoType[] VideoTypes { get; set; }
  66. /// <summary>
  67. /// Whether or not to perform the query recursively
  68. /// </summary>
  69. /// <value><c>true</c> if recursive; otherwise, <c>false</c>.</value>
  70. public bool Recursive { get; set; }
  71. /// <summary>
  72. /// Limit results to items containing specific genres
  73. /// </summary>
  74. /// <value>The genres.</value>
  75. public string[] Genres { get; set; }
  76. /// <summary>
  77. /// Limit results to items containing specific studios
  78. /// </summary>
  79. /// <value>The studios.</value>
  80. public string[] Studios { get; set; }
  81. /// <summary>
  82. /// Gets or sets the exclude item types.
  83. /// </summary>
  84. /// <value>The exclude item types.</value>
  85. public string[] ExcludeItemTypes { get; set; }
  86. /// <summary>
  87. /// Gets or sets the include item types.
  88. /// </summary>
  89. /// <value>The include item types.</value>
  90. public string[] IncludeItemTypes { get; set; }
  91. /// <summary>
  92. /// Limit results to items containing specific years
  93. /// </summary>
  94. /// <value>The years.</value>
  95. public int[] Years { get; set; }
  96. /// <summary>
  97. /// Limit results to items containing a specific person
  98. /// </summary>
  99. /// <value>The person.</value>
  100. public string Person { get; set; }
  101. /// <summary>
  102. /// If the Person filter is used, this can also be used to restrict to a specific person type
  103. /// </summary>
  104. /// <value>The type of the person.</value>
  105. public string PersonType { get; set; }
  106. /// <summary>
  107. /// Search characters used to find items
  108. /// </summary>
  109. /// <value>The index by.</value>
  110. public string SearchTerm { get; set; }
  111. /// <summary>
  112. /// The dynamic, localized index function name
  113. /// </summary>
  114. /// <value>The index by.</value>
  115. public string IndexBy { get; set; }
  116. /// <summary>
  117. /// Gets or sets the image types.
  118. /// </summary>
  119. /// <value>The image types.</value>
  120. public ImageType[] ImageTypes { get; set; }
  121. /// <summary>
  122. /// Gets or sets the ids, which are specific items to retrieve
  123. /// </summary>
  124. /// <value>The ids.</value>
  125. public string[] Ids { get; set; }
  126. }
  127. }