using System.Linq; using Nancy.Metadata.Modules; using Nancy.Metadata.Swagger.Core; using Nancy.Metadata.Swagger.Fluent; using Sony.Filtr.AdminAPI.ViewModels.Graph; namespace Sony.Filtr.AdminAPI.Modules { public class UserGraphMetadataModule : MetadataModule { public UserGraphMetadataModule() { var tag = "User graphs"; Describe["ArtistFollowersGraph"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Get the number of followers for the user during the specified time period", tag) .WithRequestParameter("artistUri", description: "Spotify uri for the user", loc: "query", required: true) .WithRequestParameter("startDate", description: "Start date of entries, default 30 days ago if not specified", loc: "query", required: false) .WithRequestParameter("endDate", description: "End date of entries, default today if not specified", loc: "query", required: false) .WithDefaultResponse()); } } }