Beispiel #1
0
        public static Doggo GetDetails(int id)
        {
            var apiCallTask = ApiHelper.Get(id);
            var result      = apiCallTask.Result;

            JObject jsonResponse = JsonConvert.DeserializeObject <JObject>(result);
            Doggo   doggo        = JsonConvert.DeserializeObject <Doggo>(jsonResponse.ToString());

            return(doggo);
        }
Beispiel #2
0
 public static void Put(Doggo doggo)
 {
     string jsonDoggo   = JsonConvert.SerializeObject(doggo);
     var    apiCallTask = ApiHelper.Put(doggo.DoggoId, jsonDoggo);
 }