Skip to content

Commit

Permalink
fix : 누락된 ResponseHomeUserDto key값 넣어주기 #7
Browse files Browse the repository at this point in the history
  • Loading branch information
SeonHwan-Kim committed May 10, 2023
1 parent 784e26c commit 67a65ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ object ApiFactory {
}

object ReqresApiFactory {
val json = Json { ignoreUnknownKeys = true }
val retrofit: Retrofit by lazy {
Retrofit.Builder()
.baseUrl("https://reqres.in/api/")
.addConverterFactory(json.asConverterFactory("application/json".toMediaType()))
.addConverterFactory(Json.asConverterFactory("application/json".toMediaType()))
.build()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ data class ResponseHomeUserDto(
@SerialName("total_pages")
val total_pages:Int,
@SerialName("data")
val data: List<UserData>
val data: List<UserData>,
@SerialName("support")
val support: Support
){
@Serializable
data class UserData(
Expand All @@ -29,4 +31,12 @@ data class ResponseHomeUserDto(
@SerialName("avatar")
val avatar: String
)

@Serializable
data class Support(
@SerialName("text")
val text: String,
@SerialName("url")
val url: String
)
}

0 comments on commit 67a65ec

Please sign in to comment.