using Nancy.Metadata.Modules; using Nancy.Metadata.Swagger.Core; using Nancy.Metadata.Swagger.Fluent; using Sony.Filtr.AdminAPI.ViewModels.BestOfTheWeek; using Sony.Filtr.Contracts.Entities; using System.Collections.Generic; namespace Sony.Filtr.AdminAPI.Modules { public class BestOfTheWeekMetadataModule : MetadataModule { public BestOfTheWeekMetadataModule() { const string tag = "Best of the Week"; Describe["GetAppleMusicTracksForFriday"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Get tracklists for specified Friday with fallback to latest", tag) .WithRequestParameter("date", description: "Date of Friday", loc: "query", required: false) .WithRequestParameter("limit", description: "Pagination limit (default 100)", loc: "query", required: false) .WithRequestParameter("offset", description: "Pagination offset (default 0)", loc: "query", required: false) .WithDefaultResponse>() ); Describe["GetAllAvailableAppleMusicNewMusicFridays"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Get all Fridays which have processed data associated with them", tag) .WithDefaultResponse>()); Describe["GetAppleMusicPlaylists"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Get playlist metadata for Best of the Week playlists", tag) .WithDefaultResponse>()); } } }