-
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.
- Loading branch information
1 parent
da8e6f3
commit 96c3dd4
Showing
5 changed files
with
106 additions
and
5 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
app/src/main/java/com/sopt/carrot/data/profile/ProfileDto.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,44 @@ | ||
package com.sopt.carrot.data.profile | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class RequestProfileDto( | ||
@SerialName("birthYear") | ||
val birthYear: Int, | ||
@SerialName("gender") | ||
val gender: Int, | ||
@SerialName("introduction") | ||
val introduction: String?, | ||
@SerialName("name") | ||
val name: String?, | ||
@SerialName("phoneNumber") | ||
val phoneNumber: String | ||
) | ||
|
||
@Serializable | ||
data class ResponseProfileDto( | ||
@SerialName("data") | ||
val `data`: Data, | ||
@SerialName("message") | ||
val message: String, | ||
@SerialName("status") | ||
val status: Int, | ||
@SerialName("success") | ||
val success: Boolean | ||
) { | ||
@Serializable | ||
data class Data( | ||
@SerialName("birthYear") | ||
val birthYear: Int, | ||
@SerialName("gender") | ||
val gender: Int, | ||
@SerialName("introduction") | ||
val introduction: String, | ||
@SerialName("name") | ||
val name: Any, | ||
@SerialName("phoneNumber") | ||
val phoneNumber: String | ||
) | ||
} |
15 changes: 15 additions & 0 deletions
15
app/src/main/java/com/sopt/carrot/data/profile/ProfileService.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 com.sopt.carrot.data.profile | ||
|
||
import retrofit2.Call | ||
import retrofit2.http.Body | ||
import retrofit2.http.Headers | ||
import retrofit2.http.POST | ||
|
||
|
||
interface ProfileService { | ||
@Headers("Authorization: 1") | ||
@POST("/users/profile") | ||
fun apply( | ||
@Body request: RequestProfileDto | ||
): Call<ResponseProfileDto> | ||
} |
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