Jarling is a Java library that provides simple access to the Starling Bank API. It aims to have minimal dependencies, currently only gson for json processing and is compatible with Java 1.8+.
- Java 1.8 or greater
- Gson
Jarling 0.2.0 can be downloaded here or added as a dependency to Maven using the following:
<dependency>
<groupId>org.jarling</groupId>
<artifactId>jarling</artifactId>
<version>0.2.0</version>
</dependency>
You'll first need to obtain an access token. You can either use your own account or Starling's sandbox account. Details of how to obtain a token can be found here.
StarlingBank starling = new Starling(StarlingBankEnvironment.PRODUCTION, "<my_personal_access_token>");
Account account = starling.getAccount();
System.out.println(account.getName() + "'s sort code is " + account.getSortCode() + " and your account number is " + account.getNumber());
AccountBalance accountBalance = starling.getAccountBalance();
System.out.println("Your balance is " + accountBalance.getAmount() + " " + accountBalance.getCurrency());
Transaction aTransaction = starling.listTransactions.get(0);
System.out.println("You spent " + aTransaction.getAmount() + " at " + aTransaction.getNarrative());
This project is licensed under the MIT License - see the LICENSE file for details