Giter Club home page Giter Club logo

yelp-demo's Introduction

Spring Boot + Yelp API V3 demo

codebeat badge

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

Installation

Use maven as usual

mvn package
./mvnw spring-boot:run

Use

As a proxy to the original API

Visit the following URLs

  • /yelp/search/{location} to search a business by its location for instance San Antonio. Take a look at the method BusinessController#searchYelp for more details
  • /yelp/business/{yelpId} to search a business by its Yelp ID, for instance zócalo-mio-san-antonio-2. Take a look a the method BusinessController#yelpBusiness for more details

Custom JSON response

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 instance San Antonio. Take a look at the method BusinessController#showBusinesses for more details
  • /business/{yelpId}.json to search a business by its Yelp ID, for instance zócalo-mio-san-antonio-2. Take a look a the method BusinessController#showBusiness for more details

Server-side HTML response

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 instance San Antonio. Take a look at the methods YelpController#showSearchForm and YelpController#showSearchResults for more details
  • /business/{businessId} to search a business by its Yelp ID, for instance zócalo-mio-san-antonio-2. Take a look a the method YelpController#viewBusiness for more details

yelp-demo's People

Contributors

montealegreluis avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.