This library is a version of jQuestrade that has been tailored for use with the Android Room persistence library.
Made for QuestGraph.
- Objects have been defined using the Room schema.
- Some objects have been given a
timeOfCreation
property, since Room tables are immutable.
Questrade q = new Questrade(refreshToken);
try {
q.activate(); // This must be called before making API requests
Account[] accs = q.getAccounts(); // Get all accounts
ZonedDateTime time = q.getTime(); // Get server time
ZonedDateTime startTime = ZonedDateTime.now().minusMonths(1);
ZonedDateTime endTime = ZonedDateTime.now();
// Get all orders for the first account in the last month
Order[] orders = q.getOrders(accs[0].getNumber(), startTime, endTime);
} catch (RefreshTokenException e) {
// Prompt user to enter another refresh token
}
- Add the following into your
build.gradle
file:
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.mateimarica:j-questrade-room:1.0'
}
- Add the following into your
pom.xml
file:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.mateimarica</groupId>
<artifactId>j-questrade-room</artifactId>
<version>1.0</version>
</dependency>
See the wiki of the base library, jQuestrade.
-
This library is not affiliated, maintained, authorized, or endorsed by Questrade.
-
This library has not been heavily tested. Use at your own risk.