PagingKeyConfig
annotation class PagingKeyConfig(val keySize: Int, val mapper: KClass<*>)
Content copied to clipboard
Author
skydoves (Jaewoong Eum)
Since
1.0.0
PagingKeyConfig contains the paging configurations on the service interface method to give information to the internal PagingCallAdapter.
@GET("pokemon")
@PagingKeyConfig(
keySize = 20,
mapper = PokemonPagingMapper::class
)
public suspend fun fetchPokemonList(
@Query("limit") limit: Int = 20,
@PagingKey @Query("offset") offset: Int = 0
): NetworkPagingSource<PokemonResponse, Pokemon>
Content copied to clipboard
Constructors
Properties
Link copied to clipboard
Maps the response type to the list of a paging item, which must extends PagingMapper.