예제 #1
0
        public static PinnedDeal Get(string userId, int dealId)
        {
            var        apiCallTask  = ApiHelper.GetPinnedDeal(userId, dealId);
            var        result       = apiCallTask.Result;
            JObject    jsonResponse = JsonConvert.DeserializeObject <JObject>(result);
            PinnedDeal pinnedDeal   = JsonConvert.DeserializeObject <PinnedDeal>(jsonResponse.ToString());

            return(pinnedDeal);
        }
예제 #2
0
 public static void Post(PinnedDeal newPinnedDeal)
 {
     string jsonPinnedDeal = JsonConvert.SerializeObject(newPinnedDeal);
     var    apiCallTask    = ApiHelper.PostPinnedDeal(jsonPinnedDeal);
 }