public static void PhoneIdStandard(string[] args) { CheckArgument.ArrayLengthIs(args, 1, "args"); string phoneNumber = args[0]; PhoneIdService service = new PhoneIdService(GetConfiguration()); PhoneIdStandardResponse response = service.StandardLookup(phoneNumber); }
public static void RawPhoneIdLive(string[] args) { CheckArgument.ArrayLengthIs(args, 1, "args"); string phoneNumber = args[0]; RawPhoneIdService service = new RawPhoneIdService(GetConfiguration()); string jsonResponse = service.LiveLookupRaw(phoneNumber); Console.WriteLine(jsonResponse); }
public static void PhoneIdScore(string[] args) { CheckArgument.ArrayLengthIs(args, 1, "args"); string phoneNumber = args[0]; PhoneIdService service = new PhoneIdService(GetConfiguration()); PhoneIdScoreResponse response = service.ScoreLookup(phoneNumber); Console.WriteLine("Phone Number: {0}", phoneNumber); Console.WriteLine("Risk : {0} [{1}] - Recommend {2}", response.Risk.Level, response.Risk.Score, response.Risk.Recommendation); }
public static void PhoneIdContact(string[] args) { CheckArgument.ArrayLengthIs(args, 1, "args"); string phoneNumber = args[0]; PhoneIdService service = new PhoneIdService(GetConfiguration()); PhoneIdContactResponse response = service.ContactLookup(phoneNumber); Console.WriteLine("Phone Number: {0}", phoneNumber); Console.WriteLine("Name : {0}", response.Contact.FullName); Console.WriteLine("Address :\r\n{0}", response.Contact.GetFullAddress()); }
public static void MapRegistrationLocation(string[] args) { CheckArgument.ArrayLengthIs(args, 1, "args"); string phoneNumber = args[0]; PhoneIdService service = new PhoneIdService(GetConfiguration()); PhoneIdStandardResponse response = service.StandardLookup(phoneNumber); string url = string.Format( "http://maps.google.com/maps?q={0},{1}", response.Location.Coordinates.Latitude, response.Location.Coordinates.Longitude); Process.Start(url); }
public static void MapContactLocation(string[] args) { CheckArgument.ArrayLengthIs(args, 1, "args"); string phoneNumber = args[0]; PhoneIdService service = new PhoneIdService(GetConfiguration()); PhoneIdContactResponse response = service.ContactLookup(phoneNumber); string address = response.Contact.GetFullAddressOnSingleLine(); Console.WriteLine("Google Mapping: {0}", address); string url = string.Format( "http://maps.google.com/maps?q={0}", address); Process.Start(url); }
public static void PhoneIdLive(string[] args) { CheckArgument.ArrayLengthIs(args, 1, "args"); string phoneNumber = args[0]; PhoneIdService service = new PhoneIdService(GetConfiguration()); PhoneIdLiveResponse response = service.LiveLookup(phoneNumber); Console.WriteLine("Phone Number : {0}", phoneNumber); Console.WriteLine("Subscriber Status : {0}", response.Live.SubscriberStatus); Console.WriteLine("Device : {0}", response.Live.DeviceStatus); Console.Write("Roaming : {0}", response.Live.Roaming); if (string.IsNullOrEmpty(response.Live.RoamingCountry)) { Console.WriteLine(); } else { Console.WriteLine(" in {0}", response.Live.RoamingCountry); } }