Skip to content

Instantly share code, notes, and snippets.

@illuzor
Created September 22, 2018 19:44
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 illuzor/576a733c8ca3a13f67ebf925fd8f4543 to your computer and use it in GitHub Desktop.
Save illuzor/576a733c8ca3a13f67ebf925fd8f4543 to your computer and use it in GitHub Desktop.
package com.illuzor.lesson.wallpapers.api
import com.illuzor.lesson.wallpapers.model.Category
import okhttp3.ResponseBody
import retrofit2.Call
import retrofit2.http.*
interface WallpapersApi {
@GET("categories.php")
fun categories(): Call<List<Category>>
@GET("gallery.php")
fun gallery(@Query("gallery") galleryName: String): Call<List<String>>
@Streaming
@GET
fun downloadFile(@Url fileUrl: String): Call<ResponseBody>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment