-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '21-feat-보호자-홈-화면-api-연동' into develop_front
- Loading branch information
Showing
107 changed files
with
2,012 additions
and
1,298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
frontend/app/src/main/java/kr/ac/tukorea/whereareu/data/api/DementiaHomeService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package kr.ac.tukorea.whereareu.data.api | ||
|
||
import kr.ac.tukorea.whereareu.data.model.ResponseBody | ||
import kr.ac.tukorea.whereareu.data.model.home.LocationInfo | ||
import kr.ac.tukorea.whereareu.data.model.home.PostLocationInfoResponse | ||
import retrofit2.Response | ||
import retrofit2.http.Body | ||
import retrofit2.http.POST | ||
|
||
interface DementiaHomeService { | ||
@POST("receive-location-info") | ||
suspend fun postLocationInfo( | ||
@Body request: LocationInfo | ||
): Response<PostLocationInfoResponse> | ||
|
||
} |
15 changes: 0 additions & 15 deletions
15
frontend/app/src/main/java/kr/ac/tukorea/whereareu/data/api/HomeService.kt
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
frontend/app/src/main/java/kr/ac/tukorea/whereareu/data/api/NokHomeService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package kr.ac.tukorea.whereareu.data.api | ||
|
||
import kr.ac.tukorea.whereareu.data.model.ResponseBody | ||
import kr.ac.tukorea.whereareu.data.model.home.GetLocationInfoResponse | ||
import retrofit2.Response | ||
import retrofit2.http.Body | ||
import retrofit2.http.GET | ||
import retrofit2.http.Path | ||
import retrofit2.http.Query | ||
|
||
interface NokHomeService { | ||
@GET("send-live-location-info") | ||
suspend fun getDementiaLocationInfo(@Query("dementiaKey") dementiaKey: String): Response<ResponseBody<GetLocationInfoResponse>> | ||
} |
6 changes: 0 additions & 6 deletions
6
frontend/app/src/main/java/kr/ac/tukorea/whereareu/data/model/Location.kt
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
frontend/app/src/main/java/kr/ac/tukorea/whereareu/data/model/LocationInfoResponse.kt
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
...tend/app/src/main/java/kr/ac/tukorea/whereareu/data/model/home/GetLocationInfoResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package kr.ac.tukorea.whereareu.data.model.home | ||
|
||
data class GetLocationInfoResponse( | ||
val battery: Int, | ||
val isGpsOn: Boolean, | ||
val isInternetOn: Boolean, | ||
val isRingstoneOn: Int, | ||
val latitude: Double, | ||
val longitude: Double, | ||
val message: String, | ||
val status: String, | ||
val userStatus: Int, | ||
val bearing: Float, | ||
val currentSpeed: Float | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...end/app/src/main/java/kr/ac/tukorea/whereareu/data/model/home/PostLocationInfoResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package kr.ac.tukorea.whereareu.data.model.home | ||
|
||
data class PostLocationInfoResponse( | ||
val message: String, | ||
val status: String, | ||
val result: Int | ||
) |
9 changes: 0 additions & 9 deletions
9
frontend/app/src/main/java/kr/ac/tukorea/whereareu/data/model/sensor/Accelerometer.kt
This file was deleted.
Oops, something went wrong.
45 changes: 0 additions & 45 deletions
45
frontend/app/src/main/java/kr/ac/tukorea/whereareu/data/repository/AxisDataSource.kt
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
frontend/app/src/main/java/kr/ac/tukorea/whereareu/data/repository/HomeRepository.kt
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
frontend/app/src/main/java/kr/ac/tukorea/whereareu/data/repository/HomeRepositoryImpl.kt
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
.../app/src/main/java/kr/ac/tukorea/whereareu/data/repository/home/DementiaHomeRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package kr.ac.tukorea.whereareu.data.repository.home | ||
|
||
import kr.ac.tukorea.whereareu.data.model.home.LocationInfo | ||
import kr.ac.tukorea.whereareu.data.model.home.PostLocationInfoResponse | ||
import kr.ac.tukorea.whereareu.util.network.NetworkResult | ||
|
||
interface DementiaHomeRepository { | ||
suspend fun postLocationInfo(request: LocationInfo): NetworkResult<PostLocationInfoResponse> | ||
} |
17 changes: 17 additions & 0 deletions
17
.../src/main/java/kr/ac/tukorea/whereareu/data/repository/home/DementiaHomeRepositoryImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package kr.ac.tukorea.whereareu.data.repository.home | ||
|
||
import kr.ac.tukorea.whereareu.data.api.DementiaHomeService | ||
import kr.ac.tukorea.whereareu.data.model.ResponseBody | ||
import kr.ac.tukorea.whereareu.data.model.home.LocationInfo | ||
import kr.ac.tukorea.whereareu.data.model.home.PostLocationInfoResponse | ||
import kr.ac.tukorea.whereareu.util.network.NetworkResult | ||
import kr.ac.tukorea.whereareu.util.network.handleApi | ||
import javax.inject.Inject | ||
|
||
class DementiaHomeRepositoryImpl @Inject constructor( | ||
private val api: DementiaHomeService | ||
): DementiaHomeRepository { | ||
override suspend fun postLocationInfo(request: LocationInfo): NetworkResult<PostLocationInfoResponse> { | ||
return handleApi({api.postLocationInfo(request)}) {response: PostLocationInfoResponse -> response} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
frontend/app/src/main/java/kr/ac/tukorea/whereareu/data/repository/home/NokHomeRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package kr.ac.tukorea.whereareu.data.repository.home | ||
|
||
import kr.ac.tukorea.whereareu.data.model.home.GetLocationInfoResponse | ||
import kr.ac.tukorea.whereareu.util.network.NetworkResult | ||
|
||
interface NokHomeRepository { | ||
suspend fun getDementiaLocationInfo(dementiaKey: String): NetworkResult<GetLocationInfoResponse> | ||
} |
17 changes: 17 additions & 0 deletions
17
...d/app/src/main/java/kr/ac/tukorea/whereareu/data/repository/home/NokHomeRepositoryImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package kr.ac.tukorea.whereareu.data.repository.home | ||
|
||
import kr.ac.tukorea.whereareu.data.api.NokHomeService | ||
import kr.ac.tukorea.whereareu.data.model.ResponseBody | ||
import kr.ac.tukorea.whereareu.data.model.home.GetLocationInfoResponse | ||
import kr.ac.tukorea.whereareu.util.network.NetworkResult | ||
import kr.ac.tukorea.whereareu.util.network.handleApi | ||
import javax.inject.Inject | ||
|
||
class NokHomeRepositoryImpl @Inject constructor( | ||
private val api: NokHomeService | ||
): NokHomeRepository{ | ||
override suspend fun getDementiaLocationInfo(dementiaKey: String): NetworkResult<GetLocationInfoResponse> { | ||
return handleApi({api.getDementiaLocationInfo(dementiaKey)}) {response: ResponseBody<GetLocationInfoResponse> -> response.result} | ||
} | ||
|
||
} |
4 changes: 2 additions & 2 deletions
4
...reareu/data/repository/LoginRepository.kt → .../data/repository/login/LoginRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.