示例#1
0
        //
        // 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));
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }