[http://zmztours.herokuapp.com/] (http://zmztours.herokuapp.com/)
A simple web service that scrapes Lonely Planet tours by country using the lonely_planet_tours gem
Handles:
-
GET /
- SAMPLE REQUEST => http://localhost:3000
-
GET /api/v1/taiwan_tours (deprecated)
- RETURNS => JSON
- SAMPLE REQUEST => http://localhost:3000/api/v1/taiwan_tours
-
GET /api/v1/tours/[:param].json
- ACCEPTS => [:param] as the country of interest to get tour listings
- RETURNS => JSON
- SAMPLE REQUEST => http://localhost:3000/api/v1/tours/japan.json
-
GET /api/v1/tours/[:id]
- ACCEPTS => [:id] as the id of the country of interest to get tour listings
- RETURNS => JSON
- SAMPLE REQUEST => http://localhost:3000/api/v1/tours/12
-
POST /api/v1/tours
- ACCEPTS => country name in JSON format
- RETURNS => JSON
- SAMPLE REQUEST => curl -v -H "Accept: application/json" -H "Content-type: application/json" \ -X POST -d "{"country":"Honduras"}" http://localhost:3000/api/v1/tours