예제 #1
0
        public static BestSellersListNames GetNytBestSellersListNames()
        {
            BestSellersListNames bs = null;
            string res = String.Empty;

            using (WebParser wp = new WebParser(cStrNYTBooksBaseUrl))
            {
                res = wp.Request(cStrNYTBooksResource, Method.GET, cStrNYTApiKeyStr, cStrNYTApiKeyVal);
                bs  = wp.DeserializeJson <BestSellersListNames>(res);
            }
            return(bs);
        }
예제 #2
0
        public static BestSellersListNames GetNYTBestSellersListNames()
        {
            BestSellersListNames bs = null;

            try
            {
                using (WebParser wp = new WebParser(cStrNYTBooksBaseUrl))
                {
                    string res = wp.Request(cStrNYTBooksResource, Method.GET, cStrNYTApiKeyStr, cStrNYTApiKeyVal);

                    bs = wp.DeserializeJson <BestSellersListNames>(res);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }

            return(bs);
        }