public string GetItems(string data)
        {
            FindItemsInEBayStoreRequest storeRequest = JsonConvert.DeserializeObject<FindItemsInEBayStoreRequest>(data);
            if (storeRequest != null)
            {
                Store store = new Store();
                storeRequest.StoreName = "Beautiful Hearth";
                var response = store.FindItemsInStore(storeRequest);

                if (response == null)
                {
                    response = new FindItemsInEBayStoreResponse();
                }

                if (response.items == null)
                {
                    response.items = new List<FindEBayItemResponse>();
                    response.items.Add(new FindEBayItemResponse());
                }

                return JsonConvert.SerializeObject(response.items[0]);
            }

            return null;
        }
Beispiel #2
0
 static void Main(string[] args)
 {
     Store store = new Store();
     FindItemsInEBayStoreRequest request = new FindItemsInEBayStoreRequest();
     request.StoreName = "Beautiful Hearth";
     request.Keywords = "Cutlery";
     var items = store.FindItemsInStore(request);
 }