public RootObject GetRootObjectForZipCode()
        {
            Console.WriteLine("InputZipString {0}", FormatInputZipCode(InputZipCode));
            string requestString = "http://api.openweathermap.org/data/2.5/weather?zip=" + FormatInputZipCode(InputZipCode) + ",us&units=imperial&appid=" + _apiKey;


            var drh = new DataSvcRequestHandler();

            return(JsonConvert.DeserializeObject <RootObject>(drh.GetJsonResponse(requestString).GetAwaiter().GetResult()));
        }
Exemple #2
0
        // Not needed
        public List <Post> GetAllPostsFromDataSvc()
        {
            var drh = new DataSvcRequestHandler();

            return(JsonConvert.DeserializeObject <List <Post> >(drh.GetJsonResponse(httpString + "/api/post/").GetAwaiter().GetResult()));
        }