A command-line interface (CLI) application that allows you to quickly and easily track a user's recent activities on Github, directly from the terminal.
Project suggested by Roadmap.sh - Backend Developer.
- Search for recent activities of a specific Github user.
- Display events such as Push, Issues, Create, Watch, and others.
- Exception handling and error handling for requests to the Github API.
- The application makes an
HTTPRequestto the endpointhttps://api.github.com/users/<USERNAME>/events. - If the response is valid, the
response.body()is processed by the Gson library, which converts the JSON into an Array. In case of errors, the application displays appropriate messages for issues such as non-existent users, exceeded request limits, or connection failures. - The obtained data is processed according to the event
typeand formatted for display in the terminal.
- Clone the repository:
git clone https://github.com/matheushug0/github-activity-cli.git
cd github-activity-cli- Build the Maven project (minimum recommended version: 3.6.3):
mvn clean package install- Run the application:
java -jar target/github-activity-cli-1.0.jar <username>java -jar target/github-activity-cli-1.0.jar matheushug0Pushed 3 commits to matheushug0/task-tracker 4 days ago
Created in matheushug0/task-tracker 5 days ago
Opened a new Issue in matheushug0/calculadora99pay 8 days ago
Pushed 1 commit to matheushug0/imagesliteapi 34 days ago
Created in matheushug0/imagesliteapi 34 days ago
Below is the organization of the project's directories and files:
github-activity
│
├── src/
│ ├── main/
│ │ └── java/
│ │ └── br/
│ │ └── com/
│ │ └── mh/
│ │ └── Main.java
├── target/ # Maven build output (ignored by .gitignore)
├── pom.xml # Maven configuration
└── README.md # This file
- Java
- Maven
- Github API
- Gson
