public static LocationResult ParseLocationResult(HtmlDocument doc, PayByPhoneApi api) { var form = doc.DocumentNode.SelectSingleNode("//form"); var formAction = form?.GetAttributeValue("action", ""); LocationResult result = null; if (formAction != null) { if (formAction.Contains("ChooseLocation")) { // this is a multiple response result = new MultipleLocationResult(api); var mlResult = result as MultipleLocationResult; mlResult.Locations = DifferentiateResultLocation.ParseLocations(doc.DocumentNode); } else { // this is on Parking result = new SingleLocationResult(); var slResult = result as SingleLocationResult; slResult.Location = new ResultLocation(doc.DocumentNode); } } return result; }
private async void Login() { bool val; _api = new PayByPhoneApi(); await _api.Login("7202564696", "2343"); return; do { Console.WriteLine("Login to PayByPhone"); Console.Write("\tUsername: "******"\tPassword: "******"Error Logging In"); } } while (!val); Console.WriteLine("Logged in"); }
public ApiSection(PayByPhoneApi api) { MyApi = api; }
public EmailSettings(PayByPhoneApi api) : base(api) { }
public MultipleLocationResult(PayByPhoneApi api) { _api = api; }
public TermsConditions(PayByPhoneApi api) : base(api) { }
public LocationManager(PayByPhoneApi api) : base(api) { }
public PaymentDetails(PayByPhoneApi api) : base(api) { }