Ejemplo n.º 1
0
 /// <summary>
 ///     Creates the card.
 /// </summary>
 /// <param name="card">
 ///     The card.
 /// </param>
 /// <param name="token">
 ///     The token.
 /// </param>
 /// <returns>
 ///     The <see cref="Task" />.
 /// </returns>
 public Task<GriklyHttpResponseMessage<object>> CreateCard(Card card, CancellationToken token)
 {
     string path = "v1/Cards";
     return
         Execute<object>(
             new HttpRequestMessage(HttpMethod.Post, path)
             {
                 Content =
                     new StringContent(
                         JsonConvert.SerializeObject(card),
                         Encoding.UTF8,
                         "application/json"),
             },
             token);
 }
Ejemplo n.º 2
0
 /// <summary>
 ///     Updates the card.
 /// </summary>
 /// <param name="card">
 ///     The card.
 /// </param>
 /// <param name="token">
 ///     The token.
 /// </param>
 /// <returns>
 ///     The <see cref="Task" />.
 /// </returns>
 public Task<GriklyHttpResponseMessage<Card>> UpdateCard(Card card, CancellationToken token)
 {
     string path = string.Format("v1/Cards/{0}", card.CardId);
     return
         Execute<Card>(
             new HttpRequestMessage(HttpMethod.Put, path)
             {
                 Content =
                     new StringContent(
                         JsonConvert.SerializeObject(card),
                         Encoding.UTF8,
                         "application/json"),
             },
             token);
 }