mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-18 18:27:03 +05:30
all: use retrofit suspend support to hide implementation details of API
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
a3b1e02783
commit
a66186adc3
3 changed files with 3 additions and 20 deletions
|
@ -1,10 +1,9 @@
|
|||
package dev.msfjarvis.lobsters.api
|
||||
|
||||
import dev.msfjarvis.lobsters.model.LobstersPost
|
||||
import retrofit2.Call
|
||||
import retrofit2.http.GET
|
||||
|
||||
interface LobstersApi {
|
||||
@GET("hottest.json")
|
||||
fun getHottestPosts(): Call<List<dev.msfjarvis.lobsters.model.LobstersPost>>
|
||||
suspend fun getHottestPosts(): List<LobstersPost>
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue