Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Retrieve an Entity in Amatino Swift - A double-entry accounting library for iOS & MacOS
// Amatino Swift:
// Double entry accounting API
try Entity.retrieve(
session: session,
entityId: starkIndustriesId,
callback: { (error: Error?, retrievedEntity: Entity?) in
guard error == nil else {
// Handle errors, e.g. a 404 for a non-existant entity id
guard let starkIndustries: Entity = retrievedEntity else {
// Should never happen
print("Retrieved entity with name: \(")
// Ready to do cool stuff with the starkIndustries Entity!

This comment has been minimized.

Copy link
Owner Author

hwjeremy commented Jul 17, 2018

The parameters supplied to retrieve() come from the following examples:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.