CLI Application for watching the Bitcoin Price Index (BPI) in real-time, developed with Spring Shell library.
- Clone the repository:
git clone git@github.com:ehayik/coindesk-client.git
- Build project:
./gradlew build
Now you can run it by executing the following command:
./scripts/run-cli.sh
btc # display bitcoin price index (USD, EUR, GBP) once.
btc -w 0 # display bitcoin price index (USD, EUR, GBP) once.
btc -w 10s # display bitcoin price index (USD, EUR, GBP), with a 10 seconds refresh rate:
## - ns for nanoseconds
## - us for microseconds
## - ms for milliseconds
## - s for seconds
## - m for minutes
## - h for hours
## - d for days
stop btc # stop displaying the bitcoin price index.
I learned a lot from the projects and resources listed below:
- Developing CLI application with Spring Shell Series by Domagoj Madunić
- Spring Boot HTTP Clients by Maciej Walkowiak
- WireMock Spring Boot by Maciej Walkowiak
- Spring Boot Integration Tests With WireMock and JUnit 5 by Philip Riecks
- Spring Shell Reference Documentation
- Declarative Clients in Spring by Olga Maciaszek-Sharma
- JSR 354: Money and Currency: Moneta Reference Implementation
- Java Money and the Currency API by Baeldung
- Spring WebClient and long-polling by David