Android Jetpack example - List of trending Github repositories of kotlin
Single Fetch List | Paginated List | Detail |
---|---|---|
![]() |
![]() |
![]() |
This project is built with Android recommended architecture plus clean architecture following the separation of concerns principle to
make it more testable and maintainable.
If we were dealing with a bigger project we could think about separating layers (data, domain, ui) into different modules, for example, Domain
layer
does not need android dependencies and we could make a reusable module extracting it into a kotlin module
This project is using latest Jetpack libraries even in alpha, like Paging 3 or DataStore. I consider that both libraries are mature enough and small enough to be released to production
This project will use Search
Github API to request Kotlin repositories
Notes to consider:
To access the API you must provide a custom media type in the Accept header:
application/vnd.github.cloak-preview
☝️ This header is required.
The GitHub Search API provides up to 1,000 results for each search.
The Search API has a custom rate limit. For requests using Basic Authentication, OAuth, or client ID and secret, you can make up to 30 requests per minute. For unauthenticated requests, the rate limit allows you to make up to 10 requests per minute.
To get Trending repositories we are querying Github Rest API sorting by stars
That give us most starred repositories from all the time.
https://api.github.com/search/repositories?q=language:kotlin&sort=stars&per_page=10&page=1