Skip to content

mGungorr/PunkApi4J

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PunkApi4J

Java / Spring Boot Wrapper for PunkApi (https://punkapi.com)

License: MIT

📋 Table of contents

📥 Installation

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.

🚀 Usage

(Back to top)

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).

⚙️ API Example

Main application URL : http://localhost:8080

PunkApi Documentation : https://punkapi.com/documentation/v2

PunkApi Github : https://github.com/sammdec/punkapi

Endpoints

  • 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"
  }
]

🤝 Contributing

(Back to top)

  1. Fork it (https://github.com/mGungorr/PunkApi4J)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

⌨️ Author

(Back to top)

👤 Mustafa Güngör

📝 License

(Back to top)

Copyright © 2021.

This project is MIT licensed.


This README was generated with ❤️

About

Java / Spring Boot Wrapper for PunkApi (https://punkapi.com)

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages