aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Data/Queries
diff options
context:
space:
mode:
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 92919d3a5..f1af099d3 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 000000000..083e00548
--- /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 000000000..58267ebe7
--- /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; }
+ }
+}