/// <summary> /// Search for Specified Text, Show Specified Fields /// </summary> public void GetSpecifiedFieldsSearchText() { // Create the manager with the api key Route4MeManager route4Me = new Route4MeManager(c_ApiKey); AddressBookParameters addressBookParameters = new AddressBookParameters { Query = "david", Fields = "first_name,address_email", Offset = 0, Limit = 20 }; // Run the query uint total = 0; string errorString = ""; List<string[]> contacts = route4Me.SearchAddressBookLocation(addressBookParameters, out total, out errorString); Console.WriteLine(""); if (contacts != null) { Console.WriteLine("GetSpecifiedFieldsSearchText executed successfully, {0} contacts returned, total = {1}", contacts.Count, total); Console.WriteLine(""); } else { Console.WriteLine("GetSpecifiedFieldsSearchText error: {0}", errorString); } }
/// <summary> /// Get Address Book Location /// </summary> public void GetAddressbookLocation() { // Create the manager with the api key Route4MeManager route4Me = new Route4MeManager(c_ApiKey); AddressBookParameters addressBookParameters = new AddressBookParameters { Query = "david", Offset = 0, Limit = 20 }; // Run the query uint total = 0; string errorString = ""; AddressBookContact[] contacts = route4Me.GetAddressBookLocation(addressBookParameters, out total, out errorString); Console.WriteLine(""); if (contacts != null) { Console.WriteLine("GetAddressbookLocation executed successfully, {0} contacts returned, total = {1}", contacts.Length, total); Console.WriteLine(""); } else { Console.WriteLine("GetAddressbookLocation error: {0}", errorString); } }
/// <summary> /// Search Locations By IDs /// </summary> public void SearchLocationsByIDs() { // Create the manager with the api key Route4MeManager route4Me = new Route4MeManager(c_ApiKey); AddressBookParameters addressBookParameters = new AddressBookParameters { AddressId = "2640129,4621569" }; // Run the query uint total = 0; string errorString = ""; AddressBookContact[] contacts = route4Me.GetAddressBookLocation(addressBookParameters, out total, out errorString); Console.WriteLine(""); if (contacts != null) { Console.WriteLine("SearchLocationsByIDs executed successfully, {0} contacts returned, total = {1}", contacts.Length, total); Console.WriteLine(""); } else { Console.WriteLine("SearchLocationsByIDs error: {0}", errorString); } }