ItemQuery.cs 4.1 KB

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