Skip to content

Commit

Permalink
Update PokemonResponse to use @field:Json annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
taypi committed Jun 9, 2021
1 parent b3f7fcd commit dd2379f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/src/main/java/com/tay/pokedex/model/PokemonResponse.kt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.tay.pokedex.model

import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass

@JsonClass(generateAdapter = true)
data class PokemonResponse(
val count: Int,
val next: String?,
val previous: String?,
val results: List<Pokemon>
@field:Json(name = "count") val count: Int,
@field:Json(name = "next") val next: String?,
@field:Json(name = "previous") val previous: String?,
@field:Json(name = "results") val results: List<Pokemon>
)

0 comments on commit dd2379f

Please sign in to comment.