Beispiel #1
0
        public List <Book> QuickSearchByName(string name)
        {
            var message = client.GetAsync("books/v1/volumes?" + query.ToString()).Result;

            if (message.IsSuccessStatusCode)
            {
                GoogleResponse response = message.Content.ReadAsAsync <GoogleResponse>().Result;
                return(MapperForSearch.MapGoogleResponse(response));
            }
            throw new NotImplementedException();
        }
Beispiel #2
0
        public List <Book> SearchByName(string name)
        {
            query["q"] = name;
            var message = client.GetAsync("books/v1/volumes?" + query.ToString()).Result;

            if (message.IsSuccessStatusCode)
            {
                GoogleResponse response = message.Content.ReadAsAsync <GoogleResponse>().Result;
                return(MapperForSearch.MapGoogleResponse(response));
            }
            return(null);
        }