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#searchYelp
for 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#yelpBusiness
for 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#showBusinesses
for more details/business/{yelpId}.json
to search a business by its Yelp ID, for instancezócalo-mio-san-antonio-2
. Take a look a the methodBusinessController#showBusiness
for 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#showSearchForm
andYelpController#showSearchResults
for 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#viewBusiness
for more details