api: add support for fetching newest posts

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2021-03-29 11:38:52 +05:30
parent 5c7f38c2dc
commit 1d8c4a42a8
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80

View file

@ -12,6 +12,9 @@ interface LobstersApi {
@GET("hottest.json")
suspend fun getHottestPosts(@Query("page") page: Int): List<LobstersPost>
@GET("newest.json")
suspend fun getNewestPosts(@Query("page") page: Int): List<LobstersPost>
companion object {
const val BASE_URL = "https://lobste.rs"
}