diff options
| author | Patrick Barron <barronpm@gmail.com> | 2021-05-20 20:48:41 -0400 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2021-05-20 20:48:41 -0400 |
| commit | ab63a7745ce43ddab8ab48dd04076773bebe69cd (patch) | |
| tree | 6583ebcad38ce011450e4c200639dc728ae21e3a /Jellyfin.Data/Queries | |
| parent | e1f70860778687703fcc0e950fb1496afa22775e (diff) | |
Add PaginatedQuery abstract class, change startIndex to skip
Diffstat (limited to 'Jellyfin.Data/Queries')
| -rw-r--r-- | Jellyfin.Data/Queries/ActivityLogQuery.cs | 12 | ||||
| -rw-r--r-- | Jellyfin.Data/Queries/PaginatedQuery.cs | 18 |
2 files changed, 19 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/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; } + } +} |
