Last active
August 16, 2020 08:10
-
-
Save Garyteck/05af0e97901941045fb14febc6d21175 to your computer and use it in GitHub Desktop.
Network Interface of Coincap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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