-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release-1.2.0-android' into main
- Loading branch information
Showing
144 changed files
with
4,096 additions
and
806 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
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
...d/app/src/main/java/com/teamtripdraw/android/data/dataSource/address/AddressDataSource.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 com.teamtripdraw.android.data.dataSource.address | ||
|
||
interface AddressDataSource { | ||
interface Remote { | ||
suspend fun getAddresses(siDo: String, siGunGu: String): Result<List<String>> | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...src/main/java/com/teamtripdraw/android/data/dataSource/address/RemoteAddressDataSource.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,13 @@ | ||
package com.teamtripdraw.android.data.dataSource.address | ||
|
||
import com.teamtripdraw.android.data.httpClient.service.GetAddressesService | ||
import javax.inject.Inject | ||
|
||
class RemoteAddressDataSource @Inject constructor( | ||
private val getAddressesService: GetAddressesService, | ||
) : AddressDataSource.Remote { | ||
|
||
override suspend fun getAddresses(siDo: String, siGunGu: String): Result<List<String>> = | ||
getAddressesService.getAddresses(siDo, siGunGu) | ||
.process { body, headers -> Result.success(body.areas) } | ||
} |
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
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
22 changes: 22 additions & 0 deletions
22
...ava/com/teamtripdraw/android/data/httpClient/dto/request/CreateCurrentPointPostRequest.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,22 @@ | ||
package com.teamtripdraw.android.data.httpClient.dto.request | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class CreateCurrentPointPostRequest( | ||
@Json(name = "address") | ||
val address: String, | ||
@Json(name = "latitude") | ||
val latitude: Double, | ||
@Json(name = "longitude") | ||
val longitude: Double, | ||
@Json(name = "recordedAt") | ||
val recordedAt: String, | ||
@Json(name = "title") | ||
val title: String, | ||
@Json(name = "tripId") | ||
val tripId: Long, | ||
@Json(name = "writing") | ||
val writing: String, | ||
) |
10 changes: 10 additions & 0 deletions
10
...a/com/teamtripdraw/android/data/httpClient/dto/response/CreateCurrentPointPostResponse.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,10 @@ | ||
package com.teamtripdraw.android.data.httpClient.dto.response | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class CreateCurrentPointPostResponse( | ||
@Json(name = "postId") | ||
val postId: Long, | ||
) |
10 changes: 10 additions & 0 deletions
10
...c/main/java/com/teamtripdraw/android/data/httpClient/dto/response/GetAddressesResponse.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,10 @@ | ||
package com.teamtripdraw.android.data.httpClient.dto.response | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class GetAddressesResponse( | ||
@Json(name = "areas") | ||
val areas: List<String>, | ||
) |
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
28 changes: 28 additions & 0 deletions
28
...c/main/java/com/teamtripdraw/android/data/httpClient/dto/response/GetPointPostResponse.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,28 @@ | ||
package com.teamtripdraw.android.data.httpClient.dto.response | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class GetPointPostResponse( | ||
@Json(name = "address") | ||
val address: String, | ||
@Json(name = "pointResponse") | ||
val point: GetPostPointResponse, | ||
@Json(name = "postId") | ||
val postId: Long, | ||
@Json(name = "postImageUrl") | ||
val postImageUrl: String, | ||
@Json(name = "routeImageUrl") | ||
val routeImageUrl: String, | ||
@Json(name = "title") | ||
val title: String, | ||
@Json(name = "tripId") | ||
val tripId: Long, | ||
@Json(name = "writing") | ||
val writing: String, | ||
@Json(name = "isMine") | ||
val isMine: Boolean, | ||
@Json(name = "authorNickname") | ||
val authorNickname: String | ||
) |
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
18 changes: 18 additions & 0 deletions
18
...in/java/com/teamtripdraw/android/data/httpClient/service/CreateCurrentPointPostService.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,18 @@ | ||
package com.teamtripdraw.android.data.httpClient.service | ||
|
||
import com.teamtripdraw.android.data.httpClient.dto.response.CreateCurrentPointPostResponse | ||
import com.teamtripdraw.android.data.httpClient.retrofitAdapter.responseState.ResponseState | ||
import okhttp3.MultipartBody | ||
import okhttp3.RequestBody | ||
import retrofit2.http.Multipart | ||
import retrofit2.http.POST | ||
import retrofit2.http.Part | ||
|
||
interface CreateCurrentPointPostService { | ||
@Multipart | ||
@POST("/posts/current-location") | ||
suspend fun createCurrentPointPost( | ||
@Part("dto") createCurrentPointPostRequest: RequestBody, | ||
@Part imageFile: MultipartBody.Part?, | ||
): ResponseState<CreateCurrentPointPostResponse> | ||
} |
Oops, something went wrong.