Skip to content

Instantly share code, notes, and snippets.

@RobertApikyan
Created September 22, 2021 12:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobertApikyan/908574c8521d1db21b4fe752699f1ead to your computer and use it in GitHub Desktop.
Save RobertApikyan/908574c8521d1db21b4fe752699f1ead to your computer and use it in GitHub Desktop.
package com.hfh.wellbe.smartwatch.api.apiClient.retrofit.services
import com.hfh.wellbe.smartwatch.models.*
import com.hfh.wellbe.smartwatch.models.reminder.Reminder
import okhttp3.ResponseBody
import retrofit2.Call
import retrofit2.http.*
interface UserApiService {
@GET("user")
fun currentUser(): Call<User>
@GET("user/whitelist-phone/{userIdentifier}")
fun whitelistPhoneNumbers(@Path("userIdentifier") userIdentifier: String): Call<WhiteListPhoneNumbers>
@GET("lookup/emergencycallcenter/phonenumber")
fun emergencyContact(): Call<String>
@POST("device/firebasetoken")
fun registerFirebaseToken(@Body firebaseToken: FirebaseTokenRequest): Call<WatchConfig>
@POST("softphone/call/emergency")
fun emergencyAlarm(@Body emergencyAlarmRequest: EmergencyAlarmRequest): Call<BooleanResult>
@POST("fall-event/detection")
fun fallEventDetection(@Body emergencyAlarmRequest: EmergencyAlarmRequest): Call<BooleanResult>
@POST("fall-event/cancellation")
fun fallEventCancellation(@Body emergencyAlarmRequest: EmergencyAlarmRequest): Call<BooleanResult>
@POST("device/heartbeat")
fun reportDeviceHealth(
@Body healthReport: DeviceHealthReport
): Call<ResponseBody>
@PUT("health-reading/{userIdentifier}")
fun healthReport(
@Path("userIdentifier") userId: String,
@Body() healthReading: HealthReading
): Call<ResponseBody>
@POST("stt/text-request-limited")
fun textRequestLimited(
@Body textRequest: AssistantTextRequest
): Call<AssistantTextResponse>
@GET("user/{userId}/notifications")
fun notifications(
@Path("userId") userId: String,
@Query("skip") skip: Int,
@Query("take") take: Int,
): Call<PagingResult<Notification>>
@GET("user/{userId}/notifications/unseen")
fun unseenNotificationsCount(
@Path("userId") userId: String,
): Call<UnseenNotificationsCount>
@PATCH("event-reminder/{reminderIdentifier}")
fun updateReminder(
@Path("reminderIdentifier") reminderIdentifier: String,
@Body() medicationActionRequest: ReminderActionRequest,
): Call<ResponseBody>
@GET("event-reminder/{reminderIdentifier}")
fun medicationReminder(
@Path("reminderIdentifier") reminderIdentifier: String
): Call<com.hfh.wellbe.smartwatch.models.Reminder>
@PATCH("user/{userId}/notifications/{notificationId}")
fun updateNotification(
@Path("userId") userId: String,
@Path("notificationId") notificationId: String,
@Body() notification: Notification,
): Call<ResponseBody>
// @POST("health-reading")
// fun healthReport(
// @Body() healthReading: List<HealthReading>
// ): Call<ResponseBody>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment