Example #1
0
        public async Task GetRouteStopsAsync()
        {
            if (IsBusy)
            {
                return;
            }
            try
            {
                var client = new HttpClient();
                var json   = await client.GetStringAsync("https://catchall02.azurewebsites.net/tables/geolocationobject?ZUMO-API-VERSION=2.0.0");

                var all = RouteStop.FromJson(json);
                RouteStops.ReplaceRange(all);
                Title = $"Route Stops ({RouteStops.Count})";
            }
            catch (System.Exception ex)
            {
                await Application.Current.MainPage.DisplayAlert("Error", "Something went wrong", "Cancel");
            }
            finally
            {
                IsBusy = false;
            }
        }