using System.Collections.Generic; 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.Buzz { public class BuzzUsersMetadataModule : MetadataModule { public BuzzUsersMetadataModule() { const string tag = "Buzz Users"; Describe["GetBuzzPlaylists"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Get buzz users in market", tag) .WithRequestParameter("countryCode", type: "string", description: "Market id or countryCode") .WithDefaultResponse>() ); Describe["AddBuzzUser"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Add the buzz user", tag) .WithRequestParameter("countryCode", type: "string", description: "Market id or countryCode") .WithRequestModel() .WithDefaultResponse() .WithResponse(HttpStatusCode.BadRequest, "If missing or invalid buzz user") ); Describe["GetSingleBuzzUser"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Get the specified buzz user", tag) .WithRequestParameter("countryCode", type: "string", description: "Market id or countryCode") .WithRequestParameter("id", description: "Id of the buzz user") .WithDefaultResponse() .WithResponse(HttpStatusCode.NotFound, "If the specified buzz company id can not be found") ); Describe["UpdateBuzzUser"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Update the buzz user", tag) .WithRequestParameter("countryCode", type: "string", description: "Market id or countryCode") .WithRequestParameter("id", description: "Id of the buzz user") .WithRequestModel() .WithDefaultResponse() .WithResponse(HttpStatusCode.NotFound, "If the specified artist can not be found") ); Describe["DeleteBuzzUser"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Get buzz playlists for the specified company id", tag) .WithRequestParameter("countryCode", type: "string", description: "Market id or countryCode") .WithRequestParameter("id", description: "Id of the buzz user") .WithResponse(HttpStatusCode.NoContent, "Buzz user has been removed") .WithResponse(HttpStatusCode.NotFound, "If the specified artist can not be found") ); } } }