Created
August 5, 2018 04:41
-
-
Save hwjeremy/cd474060e41dc9063a9534bc6b56d2b5 to your computer and use it in GitHub Desktop.
Retrieve a Performance in Amatino Swift - A double-entry accounting library for iOS & MacOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Amatino Swift: https://github.com/amatino-code/amatino-swift | |
// Double entry accounting API | |
try Performance.retrieve( | |
session: session, | |
entity: starkIndustries, | |
startTime: Date(timeIntervalSinceNow: (-3600*24*10)), | |
endTime: Date(), | |
globalUnit: usd, | |
callback: { (error, performance) in | |
// performance.incomeAccounts & performance.expenseAccounts | |
// contain the performance of the Entity over the specified | |
// timeframe | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The parameters supplied to
Performance.retrieve()
come from the following examples:session
- Create SessionstarkIndustries
- Retrieve Entityusd
- Retrieve GlobalUnit