diff --git a/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs b/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs
index 7fa430e39f..d63cee3f76 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.
///
/// The user id.
+ [ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
public Guid UserId { get; set; }
+
///
/// Gets or sets the start index.
///
/// The start index.
+ [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; }
+
///
/// Gets or sets the size of the page.
///
/// The size of the page.
- 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; }
+
///
/// Gets or sets a value indicating whether this is recursive.
///
/// true if recursive; otherwise, false.
+ [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; }
+
///
/// Gets or sets the sort order.
///
/// The sort order.
+ [ApiMember(Name = "SortOrder", Description = "Sort Order - Ascending,Descending", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
public SortOrder? SortOrder { get; set; }
+
///
/// If specified the search will be localized within a specific item or folder
///
/// The item id.
+ [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; }
+
///
/// Fields to return within the items, in addition to basic information
///
diff --git a/MediaBrowser.Api/UserLibrary/GenresService.cs b/MediaBrowser.Api/UserLibrary/GenresService.cs
index a3b471d54e..43dcf2a319 100644
--- a/MediaBrowser.Api/UserLibrary/GenresService.cs
+++ b/MediaBrowser.Api/UserLibrary/GenresService.cs
@@ -13,6 +13,7 @@ namespace MediaBrowser.Api.UserLibrary
///
[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 21e6a9049c..81c0b2b7e8 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
///
[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
{
///
diff --git a/MediaBrowser.Api/UserLibrary/StudiosService.cs b/MediaBrowser.Api/UserLibrary/StudiosService.cs
index 7e9a0445d4..197abd0c5f 100644
--- a/MediaBrowser.Api/UserLibrary/StudiosService.cs
+++ b/MediaBrowser.Api/UserLibrary/StudiosService.cs
@@ -13,6 +13,7 @@ namespace MediaBrowser.Api.UserLibrary
///
[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 07b08eb54a..c3e3c8366b 100644
--- a/MediaBrowser.Api/UserLibrary/YearsService.cs
+++ b/MediaBrowser.Api/UserLibrary/YearsService.cs
@@ -14,6 +14,7 @@ namespace MediaBrowser.Api.UserLibrary
///
[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 d1fe8d3d54..a10b290123 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.
///
/// The size of the page.
- public int? PageSize { get; set; }
+ public int? Limit { get; set; }
///
/// Gets or sets a value indicating whether this is recursive.
///