public void RetrievePage_ShouldReturnPage()
        {
            var response = butterClient.RetrievePage <things>("things", "thingsthingsthings");

            Assert.IsNotNull(response.Data.Fields.thing1);
            Assert.IsNotNull(response.Data.PageType);
        }
        public ActionResult Index(int page = 1, int pageSize = 10)
        {
            var butterClient = new ButterCMSClient("YOUR KEY");

            var parameterDict = new Dictionary <string, string>()
            {
                { "page", page.ToString() },
                { "page_size", pageSize.ToString() },
            };



            PagesResponse <Page> caseStudyPages = butterClient.ListPages <Page>("sample-page", parameterDict);

            var viewModel = new PagesViewModel();

            viewModel.CaseStudies = new List <PageViewModel>();
            PageResponse <Page> myPage             = butterClient.RetrievePage <Page>("*", "sample-page", parameterDict);
            PageViewModel       caseStudyViewModel = new PageViewModel();

            caseStudyViewModel.Readme      = myPage.Data.Fields.readme;
            caseStudyViewModel.Seo         = myPage.Data.Fields.seo;
            caseStudyViewModel.twitterCard = myPage.Data.Fields.twitter_card;
            caseStudyViewModel.openGraph   = myPage.Data.Fields.open_graph;
            caseStudyViewModel.Slug        = myPage.Data.Slug;
            viewModel.CaseStudies.Add(caseStudyViewModel);

            return(View(viewModel));
        }
        public void ReadmeExample_RetrievePage()
        {
            var slug = "chicken-soup";

            PageResponse <RecipePage> recipe = butterClient.RetrievePage <RecipePage>("recipe", slug);

            var viewModel = new RecipeViewModel();

            viewModel.Category       = recipe.Data.Fields.category;
            viewModel.RecipeName     = recipe.Data.Fields.recipe_name;
            viewModel.MainIngredient = recipe.Data.Fields.main_ingredient;
            viewModel.EstimatedCookingTimeInMinutes = recipe.Data.Fields.estimated_cooking_time_in_minutes;
            viewModel.IngredientList = recipe.Data.Fields.ingredient_list;
            viewModel.Instructions   = recipe.Data.Fields.instructions;

            Assert.IsNotNull(viewModel);
        }