示例#1
0
        public void UpdateApiUrl(string newApiUrl)
        {
            // TODO: As you go through and implement the various APIs, update these from the fake to the real
            ProfilesAPI = new FakeProfilesAPI();
            HomeAPI     = new FakeHomeAPI();
            LoginAPI    = new FakeLoginAPI();


            //ProfilesAPI = RestService.For<IProfilesAPI>(HttpClientFactory.Create(newApiUrl));
            //HomeAPI = RestService.For<IHomeAPI>(HttpClientFactory.Create(newApiUrl));

            //LoginAPI = RestService.For<ILoginAPI>(HttpClientFactory.Create(newApiUrl));
        }
示例#2
0
        public void UpdateApiUrl(string newApiUrl)
        {
            // TODO: As you go through and implement the various APIs, update these from the fake to the real
            ProfilesAPI = new FakeProfilesAPI();
            HomeAPI     = new FakeHomeAPI();
            LoginAPI    = new FakeLoginAPI();


            //ProfilesAPI = RestService.For<IProfilesAPI>(HttpClientFactory.Create(newApiUrl));
            //HomeAPI = RestService.For<IHomeAPI>(HttpClientFactory.Create(newApiUrl));

            var productsRefitSettings = new RefitSettings {
                ContentSerializer = new JsonContentSerializer(ProductPerDTOJsonConverter.Settings)
            };

            ProductsAPI = RestService.For <IProductsAPI>(HttpClientFactory.Create(newApiUrl), productsRefitSettings);



            //LoginAPI = RestService.For<ILoginAPI>(HttpClientFactory.Create(newApiUrl));
        }