Skip to content

Instantly share code, notes, and snippets.

@aqua30
Created August 22, 2022 08:42
Show Gist options
  • Save aqua30/0b04a22298092cb66ab34b48b68dbffe to your computer and use it in GitHub Desktop.
Save aqua30/0b04a22298092cb66ab34b48b68dbffe to your computer and use it in GitHub Desktop.
const val BASE_USER_PATH_URL = "/aqua30/users"
interface TestApis {
@GET(BASE_USER_PATH_URL)
suspend fun getAllUsers(): List<User>
@GET("$BASE_USER_PATH_URL/{id}")
suspend fun getUserById(@Path("id") id: Int): User
}
data class User(
val id: Int,
val name: String,
val city: String,
val country: String
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment