using Nancy; using Nancy.Metadata.Modules; using Nancy.Metadata.Swagger.Core; using Nancy.Metadata.Swagger.Fluent; using Sony.Filtr.AdminAPI.ViewModels; namespace Sony.Filtr.AdminAPI.Modules.PublicData { public class PromotedMetadataModule : MetadataModule { public PromotedMetadataModule() { var tag = "Promoted Tracks Playlist"; Describe["GetPromotedPlaylist"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Get the active Spotify playlist used to set promoted tracks in the public API.", tag) .WithRequestParameter("countryCode", description: "Market Id") .WithDefaultResponse()); Describe["SetPromotedPlaylist"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Set the active Spotify playlist used to set promoted tracks in the public API.", tag) .WithRequestParameter("countryCode", description: "Market Id") .WithRequestModel() .WithDefaultResponse() .WithResponse(HttpStatusCode.BadRequest, "Missing or invalid request parameters") .WithResponse(HttpStatusCode.BadRequest, "Specified uri is not a playlist")); } } }