Java / Spring Boot Wrapper for PunkApi (https://punkapi.com)
Clone the repo
git clone https://github.com/mGungorr/PunkApi4J
On a separate terminal and since this is a maven project you just need to go to the root of the project and perform the command:
mvn clean install
or if you don't have installed maven on your OS
mvnw clan install
This will run the unit tests of the project and create the jar file.
After having the jar file you can simply run:
java -jar target/PunkApi4J-0.0.1-SNAPSHOT.jar
Since this is a Spring Boot project, you can also run the project with below command;
mvn spring-boot:run
or if you don't have installed maven on your OS
mvnw spring-boot:run
The project will run on port 8080 (configured as default).
Main application URL : http://localhost:8080
PunkApi Documentation : https://punkapi.com/documentation/v2
PunkApi Github : https://github.com/sammdec/punkapi
- Test :
GET /v2/test
- Get Beer with Id :
GET /v2/beer/{id}
- Get Beers :
GET /v2/beers
- Get Beers with page :
GET /v2/beers?page={page}&per_page={per_page}
- Get a random beer :
GET /v2/beers/random
- Get beer qith query :
GET /v2/beers/query
[
{
"id": 1,
"name": "Buzz",
"tagline": "A Real Bitter Experience.",
"description": "A light, crisp and bitter IPA brewed with English and American hops. A small batch brewed only once.",
"image_url": "https://images.punkapi.com/v2/keg.png"
}
]
- Fork it (https://github.com/mGungorr/PunkApi4J)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
π€ Mustafa GΓΌngΓΆr
Copyright Β© 2021.
This project is MIT licensed.
This README was generated with β€οΈ