This Kotlin terminal application retrieves GitHub user information using the GitHub API. It features a menu-driven interface for user interactions, caching of user data in memory, and robust error handling.
- Retrieve GitHub user information including username, followers, following, and repositories.
- Caching of user data to minimize API requests and improve performance.
- User-friendly menu interface for easy navigation.
- Error handling to manage API request failures and user input errors.
- Kotlin
- Retrofit for API communication
- Gson for JSON parsing
-
Clone the repository:
git clone <repository-url> cd github-user-info
-
Build the project: Ensure you have Gradle installed, then run:
./gradlew build
-
Run the application: Execute the main class:
./gradlew run
- Upon running the application, you will be presented with a menu.
- Enter the corresponding number to select an option:
- Retrieve user information by username.
- Exit the application.
The application includes error handling for:
- Invalid user input.
- API request failures (e.g., user not found, network issues).
User data is cached in memory to avoid repeated API calls for the same user, enhancing performance and reducing load on the GitHub API.
Feel free to submit issues or pull requests for improvements or bug fixes.