Simple java client inspired by Tapiriik and Garminexport that can fetch activities and heart rate from your garmin account.
<dependencies>
<dependency>
<groupId>pl.jakubtrzcinski</groupId>
<artifactId>garmin-client</artifactId>
<version>1.0.5.RELEASE</version>
</dependency>
</dependencies>
dependencies {
implementation 'pl.jakubtrzcinski:garmin-client:1.0.5.RELEASE'
}
var client = GarminConnectClient.fromLoginPassword(
"your.email@example.com",
"password"
);
var token = new UserPasswordTokenSupplier(
"your.email@example.com",
"password"
).get();
var client = new GarminConnectClient(new HardcodedTokenSupplier(
token.getSessionId(),
token.getSsoGuid()
));
TODO
var activities = client.getActivities(10, 0);
var rawTcx = client.getRawTcx(2137);
var tcxPojo = client.getTcx(2137);
var rawGpx = client.getRawGpx(2137);
var gpxPojo = client.getGpx(2137);
client.uploadTcx(new FileInputStream("sample.tcx"));
client.uploadGpx(new FileInputStream("sample.gpx"));
var heart = client.getHeartRate(LocalDate.of(2020, 1, 3));
TODO
TODO
Exception Class | Description |
---|---|
SessionExpiredGarminConnectException | token is expired |
ActivityNotFoundGarminConnectException | activity with given id is not found |
RateLimitGarminConnectException | you're sending tooo much requests |
UnknownGarminConnectException | something wrong went |
- added gpx upload
- added tcx upload
- updated README
- added ability to fetch heart rate from given date
- updated README
- Added java docs
- updated README
- Authentication refactor
- updated README