JetpackRestApi

interface JetpackRestApi

Retrofit API interface for Jetpack.

Functions

Link copied to clipboard
@GET(value = "/photos/{id}")
abstract suspend fun getPost(@Path(value = "id") id: Int): NetworkPost

Retrieves a network post with the specified ID from the designated endpoint.

Link copied to clipboard
@GET(value = "/photos")
abstract suspend fun getPosts(): List<NetworkPost>

Retrieves a list of network posts from the specified endpoint.