DataService() { roadInformation = new RoadInformation(); boothInformation = new BoothInformation(); agentInformation = new AgentInformation(); contactsInformation = new ContactsInformation(); }
public static ContactsInformation GetContactsData(int accountId) { string data = SendData(baseUrl + accountId + "/contacts", null); ContactsInformation contacts = null; try { contacts = JsonConvert.DeserializeObject <ContactsInformation>(data); } catch (Exception ex) { Console.WriteLine("An error occured while parsing received JSON data: " + ex.Message); } return(contacts); }