コード例 #1
0
        public async Task <List <MenuCategory> > GetMenuCategories()
        {
            _restResponse = await _rest.GetRequest("v1/menucategories");

            List <MenuCategory> menuCategoryList = ObjectBuilder.BuildMenuCategoryList(_restResponse);

            return(menuCategoryList);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: masgeek/pizzaout-xamarin
        private static async void GetOrderHistory(int userId)
        {
            IRestResponse restResponse = await _rest.GetRequest($"v1/my-cart/{userId}/items");

            if (restResponse != null)
            {
                List <CartItem> cartItemList = ObjectBuilder.BuildCartItemList(restResponse);

                if (cartItemList != null)
                {
                    foreach (var cartItem in cartItemList)
                    {
                        Console.WriteLine(cartItem.ITEM_PRICE);
                    }
                }

                Console.WriteLine("Press any key to exit");
            }
        }