Healthstack-Adapter > healthstack.backend.integration.adapter > HealthStackBackendAPI

HealthStackBackendAPI

[androidJvm]
interface HealthStackBackendAPI

Functions

Name Summary
getTasks

[androidJvm]
@GET(value = "/api/projects/{projectId}/tasks")
abstract suspend fun getTasks(@Header(value = "id-token")idToken: String, @Path(value = "projectId")projectId: String, @Query(value = "last_sync_time")lastSyncTime: LocalDateTime, @Query(value = "end_time")endTime: LocalDateTime, @Query(value = "status")status: String = "PUBLISHED"): List<TaskSpec>

getUploadUrl

[androidJvm]
@GET(value = "/cloud-storage/projects/{projectId}/participants/upload-url")
abstract suspend fun getUploadUrl(@Header(value = "id-token")idToken: String, @Path(value = "projectId")projectId: String, @Query(value = "object_name")objectName: String): String

registerUser

[androidJvm]
@POST(value = "/api/projects/{projectId}/users")
abstract suspend fun registerUser(@Header(value = "id-token")idToken: String, @Path(value = "projectId")projectId: String, @Bodyuser: User)

sync

[androidJvm]
@POST(value = "/api/projects/{projectId}/health-data")
abstract suspend fun sync(@Header(value = "id-token")idToken: String, @Path(value = "projectId")projectId: String, @BodyhealthData: HealthData)

updateUser

[androidJvm]
@PATCH(value = "/api/projects/{projectId}/users/{userId}")
abstract suspend fun updateUser(@Header(value = "id-token")idToken: String, @Path(value = "projectId")projectId: String, @Path(value = "userId")userId: String, @BodyuserProfile: UserProfile)

uploadTaskResult

[androidJvm]
@PATCH(value = "/api/projects/{projectId}/tasks")
abstract suspend fun uploadTaskResult(@Header(value = "id-token")idToken: String, @Path(value = "projectId")projectId: String, @BodytaskResult: List<TaskResult>)