Use a config file

This commit is contained in:
Les De Ridder 2017-03-20 22:35:57 +01:00
parent 99845434f9
commit eb924c6c72
No known key found for this signature in database
GPG Key ID: 5EC132DFA85DB372
2 changed files with 6 additions and 6 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@ __dummy.html
*.obj
__test__*__
belfius-balance
config

View File

@ -371,12 +371,11 @@ shared static this()
auto apiClient = new ApiClient("nl_BE");
apiClient.connect();
write("Card number: ");
auto cardNumber = readln()[0 .. $-1];
write("Phone zone: ");
auto phoneZone = readln()[0 .. $-1];
write("Phone subscriber: ");
auto phoneSubscriber = readln()[0 .. $-1];
auto config = File("config").byLine.map!(l => l.idup).array;
auto cardNumber = config[0];
auto phoneZone = config[1];
auto phoneSubscriber = config[2];
apiClient.login1(cardNumber, phoneZone, phoneSubscriber);
write("OTP: ");