// // GET: /HowTo/DisplayRelatedContent public ActionResult DisplayRelatedContent() { ApiClientExtension clientExtension = new ApiClientExtension(_client); RelatedContentModel model = new RelatedContentModel { OriginalArticleTitle = "Absence Seizures", RelatedContent = clientExtension.GetRelatedContent("diseases-and-conditions", "absence-seizures") }; return(View(model)); }
private List <GroupedContentModel> GetRelatedServicesGrouped(ContentArticleResponse content) { //Use the helper extension to get related service lines. ApiClientExtension extension = new ApiClientExtension(_client); List <ServiceLineMappingResponse> mappings = extension.GetMappedServices(content); //Map the related services to the grouped content model MappingToGroupedContentModelMapper mapper = new MappingToGroupedContentModelMapper(); List <GroupedContentModel> groupedContent = mapper.Map(mappings); return(groupedContent); }
private List <GroupedContentModel> GetRelatedContentGrouped(ContentArticleResponse content) { //Use the helper extension to get related content. ApiClientExtension extension = new ApiClientExtension(_client); List <ContentResponse> relatedContent = extension.GetRelatedContent(content.Bucket.Slug, content.Slug, new List <string> { "En" }); //Map the related content to the grouped content model ContentToGroupedContentModelMapper mapper = new ContentToGroupedContentModelMapper(); List <GroupedContentModel> groupedContent = mapper.Map(relatedContent); return(groupedContent); }