Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement kotlin sample #4234

Open
wants to merge 7 commits into
base: trunk
Choose a base branch
from

Conversation

Amir-yazdanmanesh
Copy link


Issue Reference: Retrofit Kotlin examples #4205

This PR introduces a Kotlin sample that demonstrates how to use Retrofit in conjunction with RxJava to fetch GitHub repositories for a specified user.

  • Added a Kotlin example that fetches repositories from the GitHub API using Retrofit and RxJava.

@kungpaogao
Copy link

kungpaogao commented Oct 9, 2024

+1, this would be nice to have, but could we also use coroutines as well to make it even more Kotlin? (edit: just found this PR #3500)

Also, it would be good to have Kotlin examples on the homepage.

@Amir-yazdanmanesh
Copy link
Author

+1, this would be nice to have, but could we also use coroutines as well to make it even more Kotlin? (edit: just found this PR #3500)

Also, it would be good to have Kotlin examples on the homepage.

While using coroutines would indeed make the implementation more idiomatic to Kotlin, I decided to go with the current libraries in the module to avoid introducing new dependencies. Adding a new library to a project like Retrofit requires the owner's permission, and in this case, I wanted to demonstrate how we can work within the existing setup, using RxJava, which is already integrated. This keeps the implementation aligned with the current project dependencies while still showcasing Kotlin features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants