public async Task <Card> Create(Dictionary <string, string> variables) { if (variables == null) { return(await Create().ConfigureAwait(false)); } else { var data = new { variables = variables, }; var request = await PostJson(Endpoints.Cards(), data).ConfigureAwait(false); var response = await request.Content.ReadAsStringAsync().ConfigureAwait(false); return(JsonConvert.DeserializeObject <Card>(response)); } }
/// <summary> /// Get saved card /// </summary> /// <param name="cardId"></param> /// <returns></returns> public Task <Card> Get(string cardId) => Get <Card>(Endpoints.Cards(cardId));
public Task <Card> Create() => PostEmpty <Card>(Endpoints.Cards());
/// <summary> /// Get saved cards /// </summary> /// <returns></returns> public Task <List <Card> > Index() => Get <List <Card> >(Endpoints.Cards());