From a4b75934e5a4737ba7721c33ad9a009060a8a246 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 14 Nov 2014 21:31:03 -0500 Subject: revise endpoint attributes --- MediaBrowser.Api/Library/LibraryService.cs | 53 +++++++++++++++--------------- 1 file changed, 26 insertions(+), 27 deletions(-) (limited to 'MediaBrowser.Api/Library/LibraryService.cs') diff --git a/MediaBrowser.Api/Library/LibraryService.cs b/MediaBrowser.Api/Library/LibraryService.cs index 231f5e9a6..ec7b1f0b3 100644 --- a/MediaBrowser.Api/Library/LibraryService.cs +++ b/MediaBrowser.Api/Library/LibraryService.cs @@ -23,8 +23,8 @@ using System.Threading.Tasks; namespace MediaBrowser.Api.Library { - [Route("/Items/{Id}/File", "GET")] - [Api(Description = "Gets the original file of an item")] + [Route("/Items/{Id}/File", "GET", Summary = "Gets the original file of an item")] + [Authenticated] public class GetFile { /// @@ -38,8 +38,8 @@ namespace MediaBrowser.Api.Library /// /// Class GetCriticReviews /// - [Route("/Items/{Id}/CriticReviews", "GET")] - [Api(Description = "Gets critic reviews for an item")] + [Route("/Items/{Id}/CriticReviews", "GET", Summary = "Gets critic reviews for an item")] + [Authenticated] public class GetCriticReviews : IReturn> { /// @@ -67,8 +67,8 @@ namespace MediaBrowser.Api.Library /// /// Class GetThemeSongs /// - [Route("/Items/{Id}/ThemeSongs", "GET")] - [Api(Description = "Gets theme songs for an item")] + [Route("/Items/{Id}/ThemeSongs", "GET", Summary = "Gets theme songs for an item")] + [Authenticated] public class GetThemeSongs : IReturn { /// @@ -92,8 +92,8 @@ namespace MediaBrowser.Api.Library /// /// Class GetThemeVideos /// - [Route("/Items/{Id}/ThemeVideos", "GET")] - [Api(Description = "Gets theme videos for an item")] + [Route("/Items/{Id}/ThemeVideos", "GET", Summary = "Gets theme videos for an item")] + [Authenticated] public class GetThemeVideos : IReturn { /// @@ -117,8 +117,8 @@ namespace MediaBrowser.Api.Library /// /// Class GetThemeVideos /// - [Route("/Items/{Id}/ThemeMedia", "GET")] - [Api(Description = "Gets theme videos and songs for an item")] + [Route("/Items/{Id}/ThemeMedia", "GET", Summary = "Gets theme videos and songs for an item")] + [Authenticated] public class GetThemeMedia : IReturn { /// @@ -139,14 +139,14 @@ namespace MediaBrowser.Api.Library public bool InheritFromParent { get; set; } } - [Route("/Library/Refresh", "POST")] - [Api(Description = "Starts a library scan")] + [Route("/Library/Refresh", "POST", Summary = "Starts a library scan")] + [Authenticated(Roles = "Admin")] public class RefreshLibrary : IReturnVoid { } - [Route("/Items/{Id}", "DELETE")] - [Api(Description = "Deletes an item from the library and file system")] + [Route("/Items/{Id}", "DELETE", Summary = "Deletes an item from the library and file system")] + [Authenticated(Roles = "Delete")] public class DeleteItem : IReturnVoid { [ApiMember(Name = "Id", Description = "Item Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "DELETE")] @@ -154,7 +154,7 @@ namespace MediaBrowser.Api.Library } [Route("/Items/Counts", "GET")] - [Api(Description = "Gets counts of various item types")] + [Authenticated] public class GetItemCounts : IReturn { [ApiMember(Name = "UserId", Description = "Optional. Get counts from a specific user's library.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")] @@ -164,8 +164,8 @@ namespace MediaBrowser.Api.Library public bool? IsFavorite { get; set; } } - [Route("/Items/{Id}/Ancestors", "GET")] - [Api(Description = "Gets all parents of an item")] + [Route("/Items/{Id}/Ancestors", "GET", Summary = "Gets all parents of an item")] + [Authenticated] public class GetAncestors : IReturn { /// @@ -183,8 +183,8 @@ namespace MediaBrowser.Api.Library public string Id { get; set; } } - [Route("/Items/YearIndex", "GET")] - [Api(Description = "Gets a year index based on an item query.")] + [Route("/Items/YearIndex", "GET", Summary = "Gets a year index based on an item query.")] + [Authenticated] public class GetYearIndex : IReturn> { /// @@ -201,23 +201,23 @@ namespace MediaBrowser.Api.Library /// /// Class GetPhyscialPaths /// - [Route("/Library/PhysicalPaths", "GET")] - [Api(Description = "Gets a list of physical paths from virtual folders")] + [Route("/Library/PhysicalPaths", "GET", Summary = "Gets a list of physical paths from virtual folders")] + [Authenticated(Roles = "Admin")] public class GetPhyscialPaths : IReturn> { } - [Route("/Library/MediaFolders", "GET")] - [Api(Description = "Gets all user media folders.")] + [Route("/Library/MediaFolders", "GET", Summary = "Gets all user media folders.")] + [Authenticated] public class GetMediaFolders : IReturn { [ApiMember(Name = "IsHidden", Description = "Optional. Filter by folders that are marked hidden, or not.", IsRequired = false, DataType = "boolean", ParameterType = "query", Verb = "GET")] public bool? IsHidden { get; set; } } - [Route("/Library/Series/Added", "POST")] - [Route("/Library/Series/Updated", "POST")] - [Api(Description = "Reports that new episodes of a series have been added by an external source")] + [Route("/Library/Series/Added", "POST", Summary = "Reports that new episodes of a series have been added by an external source")] + [Route("/Library/Series/Updated", "POST", Summary = "Reports that new episodes of a series have been added by an external source")] + [Authenticated] public class PostUpdatedSeries : IReturnVoid { [ApiMember(Name = "TvdbId", Description = "Tvdb Id", IsRequired = false, DataType = "string", ParameterType = "path", Verb = "GET")] @@ -227,7 +227,6 @@ namespace MediaBrowser.Api.Library /// /// Class LibraryService /// - [Authenticated] public class LibraryService : BaseApiService { /// -- cgit v1.2.3