Skip to content

Instantly share code, notes, and snippets.

Created Sep 17, 2017
What would you like to do?
Kitsu API for Retrofit
object KitsuRestApi {
private val kitsuApi: KitsuSpecApi
init {
val retrofit = Retrofit.Builder()
kitsuApi = retrofit.create(
fun getKitsu(filter: String, offset: Int, limit: Int): Call<KitsuResponse> {
return kitsuApi.filterKitsu(filter, limit, offset)
interface KitsuSpecApi {
fun filterKitsu(
@Query("filter[text]") filter: String,
@Query("page[limit]") limit: Int,
@Query("page[offset]") offset: Int): Call<KitsuResponse>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment