Skip to content

Instantly share code, notes, and snippets.

Last active July 17, 2018 09:12
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Create a Session in Amatino Swift. This is analogous to "logging in" to the Amatino API
// Amatino Swift:
// Double entry accounting API
try Session.create(
email: "",
secret: "high entropy passphrase",
callback: { (error, session) in
guard error == nil else {
// Handle errors. In particular, look out for 401, which
// would indicate invalid credentials such as a mistyped
// passphrase.
// Store the session somewhere for use with later requests.
print("Created new Session with ID: \(")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment