Skip to content

Instantly share code, notes, and snippets.

@Garyteck
Last active August 16, 2020 08:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Garyteck/05af0e97901941045fb14febc6d21175 to your computer and use it in GitHub Desktop.
Save Garyteck/05af0e97901941045fb14febc6d21175 to your computer and use it in GitHub Desktop.
Network Interface of Coincap
interface NetworkInterface {
companion object {
const val ENDPOINT = "https://api.coincap.io/v2/"
}
data class Cryptos (
val data : List<CryptoCurrency>
)
@GET("assets")
suspend fun getCryptos(
@Query(value="limit") limit,
@Query(value="offset") offset
) : Response<Cryptos>
}
// Gradle dependencies
// implementation 'com.squareup.retrofit2:retrofit:2.9.0'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment