Skip to content

Instantly share code, notes, and snippets.

@BambangHeriSetiawan
Last active August 14, 2019 17:42
Show Gist options
  • Save BambangHeriSetiawan/6df9769b46d777c4bd7a2745018ca9aa to your computer and use it in GitHub Desktop.
Save BambangHeriSetiawan/6df9769b46d777c4bd7a2745018ca9aa to your computer and use it in GitHub Desktop.
ApiRequests
object ApiRequests {
suspend fun discover(page:Int, year:Int) = API.Factory.create(BuildConfig.BASE_URL).discoverAsync(BuildConfig.API_KEY,page,year).await()
suspend fun search(page:Int, year:Int,query:String) = API.Factory.create(BuildConfig.BASE_URL).searchAsync(BuildConfig.API_KEY,page,year,query).await()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment