From 1e8d4bad83efcc8c0afa4553653bac6bb0369f62 Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Fri, 8 Mar 2013 17:41:38 -0500 Subject: more doc updates --- MediaBrowser.Api/UserLibrary/UserLibraryService.cs | 40 ++++++++++++++-------- 1 file changed, 25 insertions(+), 15 deletions(-) (limited to 'MediaBrowser.Api/UserLibrary/UserLibraryService.cs') diff --git a/MediaBrowser.Api/UserLibrary/UserLibraryService.cs b/MediaBrowser.Api/UserLibrary/UserLibraryService.cs index c9bab0685..ef4b2e703 100644 --- a/MediaBrowser.Api/UserLibrary/UserLibraryService.cs +++ b/MediaBrowser.Api/UserLibrary/UserLibraryService.cs @@ -4,13 +4,11 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Model.Connectivity; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; -using MediaBrowser.Model.Serialization; using MediaBrowser.Server.Implementations.HttpServer; using ServiceStack.ServiceHost; using ServiceStack.Text.Controller; using System; using System.Collections.Generic; -using System.IO; using System.Linq; using System.Threading.Tasks; @@ -21,12 +19,14 @@ namespace MediaBrowser.Api.UserLibrary /// [Route("/Users/{UserId}/Items/{Id}", "GET")] [Route("/Users/{UserId}/Items/Root", "GET")] + [ServiceStack.ServiceHost.Api(Description = "Gets an item from a user's library")] public class GetItem : IReturn { /// /// 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; } /// @@ -47,6 +47,7 @@ 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; } /// @@ -74,12 +75,14 @@ namespace MediaBrowser.Api.UserLibrary /// Class MarkFavoriteItem /// [Route("/Users/{UserId}/FavoriteItems/{Id}", "POST")] + [ServiceStack.ServiceHost.Api(Description = "Marks an item as a favorite")] public class MarkFavoriteItem : IReturnVoid { /// /// Gets or sets the user id. /// /// The user id. + [ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")] public Guid UserId { get; set; } /// @@ -93,12 +96,14 @@ namespace MediaBrowser.Api.UserLibrary /// Class UnmarkFavoriteItem /// [Route("/Users/{UserId}/FavoriteItems/{Id}", "DELETE")] + [ServiceStack.ServiceHost.Api(Description = "Unmarks an item as a favorite")] public class UnmarkFavoriteItem : IReturnVoid { /// /// Gets or sets the user id. /// /// The user id. + [ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "DELETE")] public Guid UserId { get; set; } /// @@ -112,12 +117,14 @@ namespace MediaBrowser.Api.UserLibrary /// Class ClearUserItemRating /// [Route("/Users/{UserId}/Items/{Id}/Rating", "DELETE")] + [ServiceStack.ServiceHost.Api(Description = "Deletes a user's saved personal rating for an item")] public class DeleteUserItemRating : IReturnVoid { /// /// Gets or sets the user id. /// /// The user id. + [ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "DELETE")] public Guid UserId { get; set; } /// @@ -131,12 +138,14 @@ namespace MediaBrowser.Api.UserLibrary /// Class UpdateUserItemRating /// [Route("/Users/{UserId}/Items/{Id}/Rating", "POST")] + [ServiceStack.ServiceHost.Api(Description = "Updates a user's rating for an item")] public class UpdateUserItemRating : IReturnVoid { /// /// Gets or sets the user id. /// /// The user id. + [ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")] public Guid UserId { get; set; } /// @@ -156,12 +165,14 @@ namespace MediaBrowser.Api.UserLibrary /// Class MarkPlayedItem /// [Route("/Users/{UserId}/PlayedItems/{Id}", "POST")] + [ServiceStack.ServiceHost.Api(Description = "Marks an item as played")] public class MarkPlayedItem : IReturnVoid { /// /// Gets or sets the user id. /// /// The user id. + [ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")] public Guid UserId { get; set; } /// @@ -175,12 +186,14 @@ namespace MediaBrowser.Api.UserLibrary /// Class MarkUnplayedItem /// [Route("/Users/{UserId}/PlayedItems/{Id}", "DELETE")] + [ServiceStack.ServiceHost.Api(Description = "Marks an item as unplayed")] public class MarkUnplayedItem : IReturnVoid { /// /// Gets or sets the user id. /// /// The user id. + [ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "DELETE")] public Guid UserId { get; set; } /// @@ -197,6 +210,7 @@ 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 = "POST")] public Guid UserId { get; set; } /// @@ -213,6 +227,7 @@ 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 = "POST")] public Guid UserId { get; set; } /// @@ -235,6 +250,7 @@ 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 = "DELETE")] public Guid UserId { get; set; } /// @@ -254,18 +270,21 @@ namespace MediaBrowser.Api.UserLibrary /// Class GetLocalTrailers /// [Route("/Users/{UserId}/Items/{Id}/LocalTrailers", "GET")] + [ServiceStack.ServiceHost.Api(Description = "Gets local trailers for an item")] public class GetLocalTrailers : IReturn> { /// /// 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 id. /// /// The id. + [ApiMember(Name = "Id", Description = "Item Id", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "GET")] public string Id { get; set; } } @@ -273,18 +292,21 @@ namespace MediaBrowser.Api.UserLibrary /// Class GetSpecialFeatures /// [Route("/Users/{UserId}/Items/{Id}/SpecialFeatures", "GET")] + [ServiceStack.ServiceHost.Api(Description = "Gets special features for a movie")] public class GetSpecialFeatures : IReturn> { /// /// 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 id. /// /// The id. + [ApiMember(Name = "Id", Description = "Movie Id", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "GET")] public string Id { get; set; } } @@ -294,11 +316,6 @@ namespace MediaBrowser.Api.UserLibrary /// public class UserLibraryService : BaseRestService { - /// - /// The _json serializer - /// - private readonly IJsonSerializer _jsonSerializer; - /// /// The _user manager /// @@ -309,17 +326,10 @@ namespace MediaBrowser.Api.UserLibrary /// /// Initializes a new instance of the class. /// - /// The json serializer. /// jsonSerializer - public UserLibraryService(IJsonSerializer jsonSerializer, IUserManager userManager, ILibraryManager libraryManager) + public UserLibraryService(IUserManager userManager, ILibraryManager libraryManager) : base() { - if (jsonSerializer == null) - { - throw new ArgumentNullException("jsonSerializer"); - } - - _jsonSerializer = jsonSerializer; _userManager = userManager; _libraryManager = libraryManager; } -- cgit v1.2.3