Пример #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();
        }
Пример #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);
        }