示例#1
0
        public async Task <IActionResult> Index()
        {
            var API           = new YelpAPI.YelpHelpers();
            var authenticated = await API.Authenticate(AppKeys, _context);

            if (authenticated)
            {
            }

            return(View());
        }
示例#2
0
        public async Task <IActionResult> Search([Bind("Term, Location")] YelpSearch search)
        {
            var API           = new YelpAPI.YelpHelpers();
            var authenticated = await API.Authenticate(AppKeys, _context);

            if (authenticated)
            {
                YelpSearchResult searchResult =
                    await API.GetResults(_context, search);

                return(View("YelpResult", searchResult));
            }

            return(View());
        }