示例#1
0
        public 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;
            client.GetCollections((collections, error) => {
                UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false;

                if (error == null && collections != null)
                {
                    this.collections = collections;
                    TableView.ReloadData();
                }
                else
                {
                    Console.WriteLine("Error fetching products: {0}", error);
                }
            });
        }
 public void GetCollections(Action <IEnumerable <Collection>, Response> success, Action <RetrofitError> failure)
 {
     BuyClient.GetCollections(success, failure);
 }