Skip to content

Commit

Permalink
Merge pull request #55 from RADAR-base/new_garmin_data
Browse files Browse the repository at this point in the history
Add backfill impl for new data types
  • Loading branch information
yatharthranjan authored May 10, 2023
2 parents 316b012 + ae63014 commit b1492a8
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ class GarminRequestGenerator(
config.pushIntegration.garmin.consumerKey,
userRepository
),
GarminHealthSnapshotRoute(
config.pushIntegration.garmin.consumerKey,
userRepository
),
GarminHrvRoute(
config.pushIntegration.garmin.consumerKey,
userRepository
),
GarminBloodPressureRoute(
config.pushIntegration.garmin.consumerKey,
userRepository
),
)

private val userNextRequest: MutableMap<String, Instant> = mutableMapOf()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.radarbase.push.integration.garmin.backfill.route

import org.radarbase.push.integration.garmin.user.GarminUserRepository

class GarminBloodPressureRoute(
consumerKey: String,
userRepository: GarminUserRepository
) : GarminRoute(consumerKey, userRepository) {

override fun subPath(): String = "bloodPressures"

override fun toString(): String = "garmin_blood_pressures"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.radarbase.push.integration.garmin.backfill.route

import org.radarbase.push.integration.garmin.user.GarminUserRepository

class GarminHealthSnapshotRoute(
consumerKey: String,
userRepository: GarminUserRepository
) : GarminRoute(consumerKey, userRepository) {

override fun subPath(): String = "healthSnapshot"

override fun toString(): String = "garmin_health_snapshot"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.radarbase.push.integration.garmin.backfill.route

import org.radarbase.push.integration.garmin.user.GarminUserRepository

class GarminHrvRoute(
consumerKey: String,
userRepository: GarminUserRepository
) : GarminRoute(consumerKey, userRepository) {

override fun subPath(): String = "hrv"

override fun toString(): String = "garmin_hrv"
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ class BloodPressureGarminAvroConverter(topic: String = "push_integration_garmin_
}

companion object {
const val ROOT = "bloodPressure"
const val ROOT = "bloodPressures"
}
}

0 comments on commit b1492a8

Please sign in to comment.