This is a Spring Boot application to demonstrate how to use this Java Client for the Yelp API v3.
The client can be used in the following ways:
- As a proxy to the original API
- To produce a custom JSON response
- To produce a server side HTML response
It currently support the following end-points
Use maven as usual
mvn package
./mvnw spring-boot:run
Visit the following URLs
/yelp/search/{location}to search a business by its location for instanceSan Antonio. Take a look at the methodBusinessController#searchYelpfor more details/yelp/business/{yelpId}to search a business by its Yelp ID, for instancezócalo-mio-san-antonio-2. Take a look a the methodBusinessController#yelpBusinessfor more details
The client comes with a set of DTOs that an be used to generate a JSON response different from the one returned by Yelp
Visit the following URLs
/businesses/{location}to search a business by its location for instanceSan Antonio. Take a look at the methodBusinessController#showBusinessesfor more details/business/{yelpId}.jsonto search a business by its Yelp ID, for instancezócalo-mio-san-antonio-2. Take a look a the methodBusinessController#showBusinessfor more details
The third alternative is to pass the DTOs provided by the library to the view layer, in this case Thymeleaf to produces an HTML response.
Visit the following URLs
/use the form to search a business by category and location, for instanceSan Antonio. Take a look at the methodsYelpController#showSearchFormandYelpController#showSearchResultsfor more details/business/{businessId}to search a business by its Yelp ID, for instancezócalo-mio-san-antonio-2. Take a look a the methodYelpController#viewBusinessfor more details