Created
April 10, 2021 12:52
-
-
Save ajailani4/2381c503e8bd30095be32ab14936c045 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface ApiService { | |
@GET("brands") | |
suspend fun getBrands( | |
@Query("page") page: Int, | |
@Query("limit") limit: Int | |
): Response<BrandResponse> | |
@GET("brands/{brandSlug}") | |
suspend fun getPhones( | |
@Path("brandSlug") brandSlug: String, | |
@Query("page") page: Int, | |
@Query("limit") limit: Int | |
): Response<PhoneResponse> | |
@GET("brands/{brandSlug}?limit=5") | |
suspend fun getPhonesHome( | |
@Path("brandSlug") brandSlug: String | |
): Response<PhoneResponse> | |
@GET("brands/{brandSlug}/{phoneSlug}") | |
suspend fun getPhoneSpecs( | |
@Path("brandSlug") brandSlug: String, | |
@Path("phoneSlug") phoneSlug: String | |
): Response<PhoneSpecsResponse> | |
@GET("search") | |
suspend fun getPhoneSearch( | |
@Query("query") phoneQuery: String, | |
@Query("page") page: Int, | |
@Query("limit") limit: Int | |
): Response<PhoneSearchResponse> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment