Skip to content

streethawk/venues

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description:

This is a simple REST client written using Java and Spring Boot. This client consumes Json response from FourSquare Api's Venues service and returns recommended or popular venues for a user enetered Location.

Usage:

For running locally:

  1. checkout the code
  2. mvn package
  3. java -jar target/venues-0.0.1-SNAPSHOT.jar

The mvn package will also create a war, which can be used to deploy the application in any Container (tomcat)

Note: application.properties contain client_id and client_secret, which can be generated by visiting and signing up at https://foursquare.com/developers/apps.

Checking the results

Once started locally, the service can be checked using below url http:https://localhost:8080/venues/doesNotExist

{
  "responseCode": 400,
  "responseMessage": "Couldn't geocode param near: doesNotExist"
}

http:https://localhost:8080/venues/shepherd's%20bush

{
  "responseCode": 200,
  "venueList": [
    {
      "name": "Mr Falafel",
      "url": "http:https://www.mrfalafel.co.uk",
      "fullAddress": "T4-T5 New Shepherds Bush Market (Uxbridge Rd)Shepherds BushGreater LondonW12 8LHUnited Kingdom"
    },
    {
      "name": "Westfield London",
      "url": "http:https://www.westfield.com",
      "fullAdd....
      ..
      .
      .
      }
  ]