A new version of the Amatino API Swift library is available. Amatino Swift allows you to store double-entry accounting data in a Swift application, on iOS or MacOS.
Entrystruct, with comprehensive initialisers
Sessionclass for use outside
- Unit tests for all of the above
Taken together, these changes allow you to interact with the Amatino API much more easily than in 0.0.1. 0.0.1 was fully dependent on the
AmatinoAlpha class – A thin wrapper around HTTP requests that required you to deal with your own data encoding, and parse raw
Data responses from the Amatino API.
I’m still studying the best way to distribute iOS and MacOS libraries. Right now I am leaning towards CocoaPods, and would welcome any input you might have. In the mean time, compiled libraries are available on GitHub. You are also most welcome to clone the repo and compile Amatino Swift yourself.
Here are some examples the new capabilities available in Amatino Swift v0.0.2:
Create a Session
This is analogous to ‘logging in’. You’ll notice the session is passed as a parameter throughout following examples.
Create an Entity
Entities are beings you wish to describe with accounting information. For example, a person, company, country, or project.
- Retrieve an Entity
- Retrieve a GlobalUnit
- Create an Account
- Retrieve an Account
- Create a Transaction
- Retrieve a Transaction
Still to come
The majority of objects specified in the Amatino API HTTP documentation are still not available in Amatino Swift. One glaring example is the Global Unit List – How are you supposed to retrieve Global Units if you don’t know which ones are available!?
Look out for v0.0.3 and onwards to add the missing pieces of the puzzle. Let me know how you want Amatino Swift to develop on Twitter or on the forums. Sign up to the Development Newsletter to be notified when new versions of Amatino Swift are available.