Example #1
0
        public async Task get_bar_details(string id)
        {
            BizDetails = new BizDetails();
            BizDetails = await yds.BusinessSearch(id);

            BizName = BizDetails.name;
        }
Example #2
0
        // Use Yelp data service to search for businesses
        public async void SearchYelp(string keyword, int limit, string location)
        {
            var yds = new YelpDataService(new Uri("https://api.yelp.com/v3/"));

            yelpsearch = await yds.BusinessSearch(keyword, limit, location);

            Console.WriteLine(yelpsearch.total);

            //add businesses to observable collection to be displayed on barlist page
            for (int i = 0; i < limit; i++)
            {
                _blist.Add(yelpsearch.businesses[i]);
                _blist[i].distance = (int)yelpsearch.businesses[i].distance;
                Console.WriteLine(_blist[i].name);
                Console.WriteLine("Lattitude: " + _blist[i].coordinates.latitude);
                Console.WriteLine("Longitude: " + _blist[i].coordinates.longitude);
            }
        }