On page 180 it says:
If you’re a fan of fluffy felines, you’ll be starting here.
pets/v1/src/main/kotlin/com/example/pets/PetService.kt
const val url = "https://api.thecatapi.com/v1/"
Or, if you’re all about those cuddly canine companions, just swap that line
for this one.
pets/v1/src/main/kotlin/com/example/pets/PetService.kt
const val url = "https://api.thedogapi.com/v1/"
However, the source code has two objects:
object Cats {
const val url = "https://api.thecatapi.com/v1/"
}
object Dogs {
const val url = "https://api.thedogapi.com/v1/"
}
with the URL that is used being decided by the import in the file:
import com.example.pets.Dogs.url
So you’ll likely want to update the text on pg 180 to indicate you make the change by changing the import.
p.s. Cats are OK, but Dogs Rule! ![]()
book-kotlin-coroutine-confidence version B3