Exemplo n.º 1
0
        public ApiService()
        {
            HttpClient httpClient = new HttpClient(new CustomHttpClientHandler())
            {
                BaseAddress = new Uri(ApiServiceKeys.ApiServiceBaseUrl)
            };

            refitApiService = RestService.For <IRefitApiService>(httpClient);
        }
Exemplo n.º 2
0
        public MainViewModel()
        {
            Titulo = "Consumindo API";

            Connectivity.ConnectivityChanged += Connectivity_ConnectivityChanged;
            _ApiServiceRefit = RestService.For <IRefitApiService>(Constantes.ApiBaseUrl);

            Pokemons = new ObservableCollection <Pokemon>();

            CarregarHttpExtensionCommand = new Command(ExecuteCarregarHttpExtensionCommand);
            CarregarRefitCommand         = new Command(ExecuteCarregarRefitCommand);
            CarregarFlurlCommand         = new Command(ExecuteCarregarFlurlCommand);
        }