public async Task WriteContactCsv() { Console.WriteLine(WriteContact.FromCsv(await Client.Contacts(new ContactsParams { Action = ContactsAction.write, Email = "*****@*****.**", Empfaenger = "004901234567890", Nick = "Peter Pan" }))); }
public async Task EditContactCsv() { AssertWriteContact(WriteContact.FromCsv(await BaseTest.Client.Contacts(new ContactsParams { Action = ContactsAction.write, Email = "*****@*****.**", Empfaenger = "+4901234567890", Nick = "PeterPan", Id = WriteEditContactId }))); }
public async Task <dynamic> Contacts(ContactsParams @params) { HttpMethod httpMethod = ContactsAction.read == @params.Action ? HttpMethod.Get : HttpMethod.Post; string method = Library.Util.ToTitleCase(httpMethod.Method); object[] paras = { "contacts", @params }; var response = await CallDynamicMethod(method, paras); if ([email protected]) { return(response); } return(@params.Action switch { ContactsAction.write => WriteContact.FromCsv(response), ContactsAction.del => DelContact.FromCsv(response), _ => JsonConvert.DeserializeObject <Contact[]>(response) });