The Free Software Media System - Server Backend & API
api comments for genres, studios, years, persons
LukePulverenti39ab10c87510
diff --git a/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs b/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.csindex 7fa430e39f..d63cee3f76 100644--- a/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs+++ b/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs@@ -67,16 +67,16 @@ namespace MediaBrowser.Api.UserLibraryTotalRecordCount = 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.csindex a3b471d54e..43dcf2a319 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.csindex 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/// </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.csindex 7e9a0445d4..197abd0c5f 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.csindex 07b08eb54a..c3e3c8366b 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.csindex 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./// </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>