Exemplo n.º 1
0
        public async override void ViewDidLoad()
        {
            base.ViewDidLoad();

            Title = "Collections";

            TableView.RegisterClassForCellReuse(typeof(UITableViewCell), "Cell");

            client = new BuyClient(AppDelegate.SHOP_DOMAIN, AppDelegate.API_KEY, AppDelegate.CHANNEL_ID);

            UIApplication.SharedApplication.NetworkActivityIndicatorVisible = true;

            try
            {
                collections = await client.GetCollectionsAsync();

                TableView.ReloadData();
            }
            catch (NSErrorException ex)
            {
                Console.WriteLine("Error fetching products: {0}", ex.Error);
            }
            UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false;
        }
Exemplo n.º 2
0
 public Task <IEnumerable <Collection> > GetCollectionsAsync()
 {
     return(BuyClient.GetCollectionsAsync());
 }