From c4c9126f79f43ad865cfa670bda90a94ffb39d9c Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Fri, 8 Mar 2013 14:14:09 -0500 Subject: added more attributes for api docs --- MediaBrowser.Api/UserService.cs | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'MediaBrowser.Api/UserService.cs') diff --git a/MediaBrowser.Api/UserService.cs b/MediaBrowser.Api/UserService.cs index 0eecad652..bcc3a61e0 100644 --- a/MediaBrowser.Api/UserService.cs +++ b/MediaBrowser.Api/UserService.cs @@ -24,6 +24,7 @@ namespace MediaBrowser.Api /// Class GetUser /// [Route("/Users/{Id}", "GET")] + [ServiceStack.ServiceHost.Api(Description = "Gets a user by Id")] public class GetUser : IReturn { /// @@ -38,13 +39,14 @@ namespace MediaBrowser.Api /// Class DeleteUser /// [Route("/Users/{Id}", "DELETE")] + [ServiceStack.ServiceHost.Api(Description = "Deletes a user")] public class DeleteUser : IReturnVoid { /// /// Gets or sets the id. /// /// The id. - [ApiMember(Name = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")] + [ApiMember(Name = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "DELETE")] public Guid Id { get; set; } } @@ -52,20 +54,21 @@ namespace MediaBrowser.Api /// Class AuthenticateUser /// [Route("/Users/{Id}/Authenticate", "POST")] + [ServiceStack.ServiceHost.Api(Description = "Authenticates a user")] public class AuthenticateUser : IReturnVoid { /// /// Gets or sets the id. /// /// The id. - [ApiMember(Name = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")] + [ApiMember(Name = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")] public Guid Id { get; set; } /// /// Gets or sets the password. /// /// The password. - [ApiMember(Name = "Password", IsRequired = true, DataType = "string", ParameterType = "body", Verb = "GET")] + [ApiMember(Name = "Password", IsRequired = true, DataType = "string", ParameterType = "body", Verb = "POST")] public string Password { get; set; } } @@ -73,6 +76,7 @@ namespace MediaBrowser.Api /// Class UpdateUserPassword /// [Route("/Users/{Id}/Password", "POST")] + [ServiceStack.ServiceHost.Api(Description = "Updates a user's password")] public class UpdateUserPassword : IReturnVoid { /// @@ -104,6 +108,7 @@ namespace MediaBrowser.Api /// Class UpdateUser /// [Route("/Users/{Id}", "POST")] + [ServiceStack.ServiceHost.Api(Description = "Updates a user")] public class UpdateUser : UserDto, IReturnVoid { } @@ -112,6 +117,7 @@ namespace MediaBrowser.Api /// Class CreateUser /// [Route("/Users", "POST")] + [ServiceStack.ServiceHost.Api(Description = "Creates a user")] public class CreateUser : UserDto, IReturn { } @@ -126,11 +132,6 @@ namespace MediaBrowser.Api /// private readonly IXmlSerializer _xmlSerializer; - /// - /// The _json serializer - /// - private readonly IJsonSerializer _jsonSerializer; - /// /// The _user manager /// @@ -140,22 +141,15 @@ namespace MediaBrowser.Api /// Initializes a new instance of the class. /// /// The XML serializer. - /// The json serializer. /// xmlSerializer - public UserService(IXmlSerializer xmlSerializer, IJsonSerializer jsonSerializer, IUserManager userManager) + public UserService(IXmlSerializer xmlSerializer, IUserManager userManager) : base() { - if (jsonSerializer == null) - { - throw new ArgumentNullException("jsonSerializer"); - } - if (xmlSerializer == null) { throw new ArgumentNullException("xmlSerializer"); } - _jsonSerializer = jsonSerializer; _xmlSerializer = xmlSerializer; _userManager = userManager; } -- cgit v1.2.3