static void Main(string[] args) { var apiKey = ExampleUtils.GetApiKey(args); var client = new Client(apiKey); var query = new PhoneQuery(PhoneNumber); Response <IPhone> response; try { response = client.FindPhones(query); } catch (FindException) { System.Console.Out.WriteLine("ReversePhone lookup for {0} failed!", PhoneNumber); throw; } if ((response != null) && (response.IsSuccess)) { var results = response.Results; System.Console.Out.WriteLine("ReversePhone lookup for {0} was successful, returning {1} root phone objects.{2}{2}", PhoneNumber, results.Count, System.Environment.NewLine); foreach (var phone in results) { ExampleUtils.DumpPhone(phone, 2); System.Console.Out.WriteLine(); } } #if DEBUG System.Console.Out.WriteLine("Press the ENTER key to quit..."); System.Console.In.ReadLine(); #endif }
static void Main(string[] args) { var apiKey = ExampleUtils.GetApiKey(args); var client = new Client(apiKey); var query = new LocationQuery(StreetLine1, StreetLine2, City, StateCode, PostalCode); Response <ILocation> response; try { response = client.FindLocations(query); } catch (FindException) { System.Console.Out.WriteLine("ReverseAddress lookup for {0}; {1}; {2}; {3}; {4} failed!", StreetLine1, StreetLine2, City, StateCode, PostalCode); throw; } if ((response != null) && (response.IsSuccess)) { var results = response.Results; System.Console.Out.WriteLine("ReverseAddress lookup for {0}; {1}; {2}; {3}; {4} was successful, returning {5} root location objects.{6}{6}", StreetLine1, StreetLine2, City, StateCode, PostalCode, results.Count, System.Environment.NewLine); foreach (var location in results) { ExampleUtils.DumpLocation(location, 2); System.Console.Out.WriteLine(); } } #if DEBUG System.Console.Out.WriteLine("Press the ENTER key to quit..."); System.Console.In.ReadLine(); #endif }
static void Main(string[] args) { var apiKey = ExampleUtils.GetApiKey(args); var client = new Client(apiKey); var query = new PersonQuery { FirstName = FirstName, MiddleName = MiddleName, LastName = LastName, City = City, StateCode = StateCode, PostalCode = PostalCode, }; Response <IPerson> response = null; try { response = client.FindPeople(query); } catch (FindException) { System.Console.Out.WriteLine("FindPerson lookup for {0}; {1}; {2}; {3}; {4}; {5} failed!", FirstName, MiddleName, LastName, City, StateCode, PostalCode); } if ((response != null) && (response.IsSuccess)) { var results = response.Results; Console.Out.WriteLine("FindPerson lookup for {0}; {1}; {2}; {3}; {4}; {5} was successful, returning {6} root people objects{7}", FirstName, MiddleName, LastName, City, StateCode, PostalCode, results.Count, System.Environment.NewLine); foreach (var person in results) { ExampleUtils.DumpPerson(person, 2); System.Console.Out.WriteLine(); } } #if DEBUG System.Console.Out.WriteLine("Press the ENTER key to quit..."); System.Console.In.ReadLine(); #endif }
static void Main(string[] args) { var apiKey = ExampleUtils.GetApiKey(args); var client = new Client(apiKey); var query = new BusinessQuery { Name = Name, City = City, StateCode = StateCode, PostalCode = PostalCode, }; Response <IBusiness> response = null; try { response = client.FindBusinesses(query); } catch (FindException) { Console.Out.WriteLine("FindBusiness lookup for {0}; {1}; {2}; {3} failed!", Name, City, StateCode, PostalCode); } if ((response != null) && (response.IsSuccess)) { var results = response.Results; Console.Out.WriteLine( "FindBusiness lookup for {0}; {1}; {2}; {3} was successful, returning {4} root business objects{5}{5}", Name, City, StateCode, PostalCode, results.Count, System.Environment.NewLine); foreach (var business in results) { ExampleUtils.DumpBusiness(business, 2); Console.Out.WriteLine(); } } #if DEBUG System.Console.Out.WriteLine("Press the ENTER key to quit..."); System.Console.In.ReadLine(); #endif }