a tour guide app.
Natour is a web application that allows tourist to book tours
Welcome to version 1 of Natour API. Below you will find a current list of available methods on different endpoints.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
To work with this project you need to have the following installed on your local machine
```bash
$ git clone https://github.com/abejide001/natour.git
$ cd natour
$ npm i
$ npm run seed
$ npm run start:dev
API BASE URL http://booktours.herokuapp.com/api/v1. It’s recommended to attach a authorization
Header containing the generated token
from /api/auth/signin
to all access all requests.
/api/v1/tours
method | route | description |
---|---|---|
GET | / | Get all tours |
GET | /:tourId | Get a tour |
POST | / | Create a tour |
PATCH | /:tourId | Update a tour |
DELETE | /:tourId | Delete a tour |
GET | /top | Get top tours |
GET | /tour-stats | Get tour stats |
GET | /monthly-plan/:year | Get monthly tours |
GET | /archives | Get archives |
DELETE | /unarchive/:tourId | Unarchive a tour |
DELETE | /archives/:tourId | archive a tour |
GET | /:tourId/reviews | Get all reviews belonging to a tour |
GET | /tours-within/:distance/center/:latlng/unit/:unit | Get tours within |
GET | /distances/:latlng/unit/:unit | Get distances |
POST | /:tourId/reviews | Create review for tour |
/api/v1/users
method | route | description |
---|---|---|
GET | / | Get all users |
GET | /me | Get a single user |
PATCH | /updateme | Update a user |
DELETE | /delete-me | Delete a user |