Created
February 17, 2019 23:37
-
-
Save CostaFot/9fb43a92fce47b38cf38909822defb5b to your computer and use it in GitHub Desktop.
This is where the GET is located
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
class CatsDataSource(retrofit: Retrofit) { | |
private val api: CatsApi = retrofit.create(CatsApi::class.java) | |
fun getNumberOfRandomCats(limit: Int, category_ids: Int?) = | |
api.getNumberOfRandomCats(limit, category_ids) | |
interface CatsApi { | |
@GET("images/search") | |
fun getNumberOfRandomCats(@Query("limit") limit: Int, @Query("category_ids") category_ids: Int?): Single<List<NetCat>> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment