aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Data/Queries
diff options
context:
space:
mode:
authorcvium <clausvium@gmail.com>2021-09-05 10:11:17 +0200
committercvium <clausvium@gmail.com>2021-09-05 10:11:17 +0200
commitffe5ae8056d2f145bacae120b56fde39d132dc6f (patch)
tree174625f71dae8abd79fb87ca606b514c407b770c /Jellyfin.Data/Queries
parent417a7011c7b5fe4a5ca5ce7c0b61c14f15bc748b (diff)
parentff83fabac35a7bf8756a8d822b8f031d700dbb64 (diff)
Merge branch 'master' into TVFix
Diffstat (limited to 'Jellyfin.Data/Queries')
-rw-r--r--Jellyfin.Data/Queries/ActivityLogQuery.cs12
-rw-r--r--Jellyfin.Data/Queries/DeviceQuery.cs25
-rw-r--r--Jellyfin.Data/Queries/PaginatedQuery.cs18
3 files changed, 44 insertions, 11 deletions
diff --git a/Jellyfin.Data/Queries/ActivityLogQuery.cs b/Jellyfin.Data/Queries/ActivityLogQuery.cs
index 92919d3a51..f1af099d3c 100644
--- a/Jellyfin.Data/Queries/ActivityLogQuery.cs
+++ b/Jellyfin.Data/Queries/ActivityLogQuery.cs
@@ -5,19 +5,9 @@ namespace Jellyfin.Data.Queries
/// <summary>
/// A class representing a query to the activity logs.
/// </summary>
- public class ActivityLogQuery
+ public class ActivityLogQuery : PaginatedQuery
{
/// <summary>
- /// Gets or sets the index to start at.
- /// </summary>
- public int? StartIndex { get; set; }
-
- /// <summary>
- /// Gets or sets the maximum number of items to include.
- /// </summary>
- public int? Limit { get; set; }
-
- /// <summary>
/// Gets or sets a value indicating whether to take entries with a user id.
/// </summary>
public bool? HasUserId { get; set; }
diff --git a/Jellyfin.Data/Queries/DeviceQuery.cs b/Jellyfin.Data/Queries/DeviceQuery.cs
new file mode 100644
index 0000000000..083e00548d
--- /dev/null
+++ b/Jellyfin.Data/Queries/DeviceQuery.cs
@@ -0,0 +1,25 @@
+using System;
+
+namespace Jellyfin.Data.Queries
+{
+ /// <summary>
+ /// A query to retrieve devices.
+ /// </summary>
+ public class DeviceQuery : PaginatedQuery
+ {
+ /// <summary>
+ /// Gets or sets the user id of the device.
+ /// </summary>
+ public Guid? UserId { get; set; }
+
+ /// <summary>
+ /// Gets or sets the device id.
+ /// </summary>
+ public string? DeviceId { get; set; }
+
+ /// <summary>
+ /// Gets or sets the access token.
+ /// </summary>
+ public string? AccessToken { get; set; }
+ }
+}
diff --git a/Jellyfin.Data/Queries/PaginatedQuery.cs b/Jellyfin.Data/Queries/PaginatedQuery.cs
new file mode 100644
index 0000000000..58267ebe7f
--- /dev/null
+++ b/Jellyfin.Data/Queries/PaginatedQuery.cs
@@ -0,0 +1,18 @@
+namespace Jellyfin.Data.Queries
+{
+ /// <summary>
+ /// An abstract class for paginated queries.
+ /// </summary>
+ public abstract class PaginatedQuery
+ {
+ /// <summary>
+ /// Gets or sets the index to start at.
+ /// </summary>
+ public int? Skip { get; set; }
+
+ /// <summary>
+ /// Gets or sets the maximum number of items to include.
+ /// </summary>
+ public int? Limit { get; set; }
+ }
+}