public async Task <List <Vegetable> > FetchVegetables()
        {
            VegResponse response = await _client.Get <VegResponse>(API_BASE);

            _lastResponse = response;
            List <Vegetable> vegetables = new List <Vegetable> ();

            vegetables = response.Vegetables;
            return(vegetables);
        }
        public async Task <string> UploadVegetable(Vegetable v)
        {
            vegetable veg = new vegetable(v.Name, v.Photo.Url);

            var json     = JsonConvert.SerializeObject(veg, Formatting.Indented);
            var response = await _client.Post <VegResponse> (API_BASE, json);

            _lastResponse = response;

            return(response.Status);
        }
 public VegetableClient()
 {
     _client       = new RestService();
     _lastResponse = null;
 }