aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs20
-rw-r--r--MediaBrowser.Api/UserLibrary/GenresService.cs1
-rw-r--r--MediaBrowser.Api/UserLibrary/PersonsService.cs5
-rw-r--r--MediaBrowser.Api/UserLibrary/StudiosService.cs1
-rw-r--r--MediaBrowser.Api/UserLibrary/YearsService.cs1
-rw-r--r--MediaBrowser.Model/Dto/ItemsByNameQuery.cs2
6 files changed, 22 insertions, 8 deletions
diff --git a/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs b/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs
index 7fa430e39..d63cee3f7 100644
--- a/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs
+++ b/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs
@@ -67,16 +67,16 @@ namespace MediaBrowser.Api.UserLibrary
TotalRecordCount = ibnItemsArray.Length
};
- if (request.StartIndex.HasValue || request.PageSize.HasValue)
+ if (request.StartIndex.HasValue || request.Limit.HasValue)
{
if (request.StartIndex.HasValue)
{
ibnItems = ibnItems.Skip(request.StartIndex.Value);
}
- if (request.PageSize.HasValue)
+ if (request.Limit.HasValue)
{
- ibnItems = ibnItems.Take(request.PageSize.Value);
+ ibnItems = ibnItems.Take(request.Limit.Value);
}
}
@@ -163,32 +163,44 @@ namespace MediaBrowser.Api.UserLibrary
/// Gets or sets the user id.
/// </summary>
/// <value>The user id.</value>
+ [ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
public Guid UserId { get; set; }
+
/// <summary>
/// Gets or sets the start index.
/// </summary>
/// <value>The start index.</value>
+ [ApiMember(Name = "StartIndex", Description = "The record index to start at. All items with a lower index will be dropped from the results.", IsRequired = false, DataType = "int", ParameterType = "query", Verb = "GET")]
public int? StartIndex { get; set; }
+
/// <summary>
/// Gets or sets the size of the page.
/// </summary>
/// <value>The size of the page.</value>
- public int? PageSize { get; set; }
+ [ApiMember(Name = "Limit", Description = "The maximum number of records to return", IsRequired = false, DataType = "int", ParameterType = "query", Verb = "GET")]
+ public int? Limit { get; set; }
+
/// <summary>
/// Gets or sets a value indicating whether this <see cref="GetItemsByName" /> is recursive.
/// </summary>
/// <value><c>true</c> if recursive; otherwise, <c>false</c>.</value>
+ [ApiMember(Name = "Recursive", Description = "When searching within folders, this determines whether or not the search will be recursive.", IsRequired = false, DataType = "boolean", ParameterType = "query", Verb = "GET")]
public bool Recursive { get; set; }
+
/// <summary>
/// Gets or sets the sort order.
/// </summary>
/// <value>The sort order.</value>
+ [ApiMember(Name = "SortOrder", Description = "Sort Order - Ascending,Descending", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
public SortOrder? SortOrder { get; set; }
+
/// <summary>
/// If specified the search will be localized within a specific item or folder
/// </summary>
/// <value>The item id.</value>
+ [ApiMember(Name = "Id", Description = "If specified the search will be localized within a specific item or folder", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
public string Id { get; set; }
+
/// <summary>
/// Fields to return within the items, in addition to basic information
/// </summary>
diff --git a/MediaBrowser.Api/UserLibrary/GenresService.cs b/MediaBrowser.Api/UserLibrary/GenresService.cs
index a3b471d54..43dcf2a31 100644
--- a/MediaBrowser.Api/UserLibrary/GenresService.cs
+++ b/MediaBrowser.Api/UserLibrary/GenresService.cs
@@ -13,6 +13,7 @@ namespace MediaBrowser.Api.UserLibrary
/// </summary>
[Route("/Users/{UserId}/Items/{Id}/Genres", "GET")]
[Route("/Users/{UserId}/Items/Root/Genres", "GET")]
+ [ServiceStack.ServiceHost.Api(Description = "Gets all genres from a given item, folder, or the entire library")]
public class GetGenres : GetItemsByName
{
}
diff --git a/MediaBrowser.Api/UserLibrary/PersonsService.cs b/MediaBrowser.Api/UserLibrary/PersonsService.cs
index 21e6a9049..81c0b2b7e 100644
--- a/MediaBrowser.Api/UserLibrary/PersonsService.cs
+++ b/MediaBrowser.Api/UserLibrary/PersonsService.cs
@@ -1,6 +1,4 @@
-using MediaBrowser.Common.Net;
-using MediaBrowser.Controller;
-using MediaBrowser.Controller.Entities;
+using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using ServiceStack.ServiceHost;
using System;
@@ -15,6 +13,7 @@ namespace MediaBrowser.Api.UserLibrary
/// </summary>
[Route("/Users/{UserId}/Items/{Id}/Persons", "GET")]
[Route("/Users/{UserId}/Items/Root/Persons", "GET")]
+ [ServiceStack.ServiceHost.Api(Description = "Gets all persons from a given item, folder, or the entire library")]
public class GetPersons : GetItemsByName
{
/// <summary>
diff --git a/MediaBrowser.Api/UserLibrary/StudiosService.cs b/MediaBrowser.Api/UserLibrary/StudiosService.cs
index 7e9a0445d..197abd0c5 100644
--- a/MediaBrowser.Api/UserLibrary/StudiosService.cs
+++ b/MediaBrowser.Api/UserLibrary/StudiosService.cs
@@ -13,6 +13,7 @@ namespace MediaBrowser.Api.UserLibrary
/// </summary>
[Route("/Users/{UserId}/Items/{Id}/Studios", "GET")]
[Route("/Users/{UserId}/Items/Root/Studios", "GET")]
+ [ServiceStack.ServiceHost.Api(Description = "Gets all studios from a given item, folder, or the entire library")]
public class GetStudios : GetItemsByName
{
}
diff --git a/MediaBrowser.Api/UserLibrary/YearsService.cs b/MediaBrowser.Api/UserLibrary/YearsService.cs
index 07b08eb54..c3e3c8366 100644
--- a/MediaBrowser.Api/UserLibrary/YearsService.cs
+++ b/MediaBrowser.Api/UserLibrary/YearsService.cs
@@ -14,6 +14,7 @@ namespace MediaBrowser.Api.UserLibrary
/// </summary>
[Route("/Users/{UserId}/Items/{Id}/Years", "GET")]
[Route("/Users/{UserId}/Items/Root/Years", "GET")]
+ [ServiceStack.ServiceHost.Api(Description = "Gets all years from a given item, folder, or the entire library")]
public class GetYears : GetItemsByName
{
}
diff --git a/MediaBrowser.Model/Dto/ItemsByNameQuery.cs b/MediaBrowser.Model/Dto/ItemsByNameQuery.cs
index d1fe8d3d5..a10b29012 100644
--- a/MediaBrowser.Model/Dto/ItemsByNameQuery.cs
+++ b/MediaBrowser.Model/Dto/ItemsByNameQuery.cs
@@ -22,7 +22,7 @@ namespace MediaBrowser.Model.Dto
/// Gets or sets the size of the page.
/// </summary>
/// <value>The size of the page.</value>
- public int? PageSize { get; set; }
+ public int? Limit { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this <see cref="GetItemsByName" /> is recursive.
/// </summary>