BASE URL https://guidr-project.herokuapp.com
- Attach endpoints to the Base URL to hit them with HTTP Requests.
Links | Endpoints |
---|---|
POST Registration | /users/signUp |
POST Login | /users/login |
All EndPoints listed below require a
token
! Send anauthorizatoin header
with the token provided upon login.
Links | Endpoints |
---|---|
GET Trips by user ID | /users/:id/trips |
POST Add new trip | /users/:id/trips |
GET Get profile by user ID | /users/:id/profile |
PUT Update user profile info | /users/:id/profile |
GET Get all public trips | /trips |
PUT Update a trip by trip ID | /trips/:id |
DELETE Delete a trip by trip ID | /trips/:id |
Payload: an object with the following credentials:
Required:
username
,password
,full_name
{
"username": "newUsername",
"password": "newPassword",
"email": "[email protected]",
"full_name": "John"
}
Return: Returns message that new user was create (may or may not be used by front end)
Payload: an object with the following credentials:
Required:
username
,password
{
"username": "newUsername",
"password": "newPassword"
}
Return:
{
"id": 5,
"token": "9834yt834yg89024hy3t89347yt297wey78t643879fhuowe"
}
Return:
{
"id": 8,
"title": "Yosemite",
"description": "When hiking through the park",
"private": true,
"type": "Hiking",
"start_date": "2019-07-15",
"end_date": "2019-07-17",
"duration_hours": 5,
"duration_days": 2
}
Required:
title
,description
,private
,type
,start_date
,end_date
,duration_hours
,duration_days
{
"title": "Yosemite",
"description": "When hiking through the park",
"private": true,
"type": "Hiking",
"start_date": "2019-07-15",
"end_date": "2019-07-17",
"duration_hours": 5,
"duration_days": 2
}
Return:
{
"id": 8,
"title": "Yosemite",
"description": "When hiking through the park",
"private": true,
"type": "Hiking",
"start_date": "2019-07-15",
"end_date": "2019-07-17",
"duration_hours": 5,
"duration_days": 2,
"user_id": 4
}
Return:
{
"full_name": "Sean McDonnell",
"email": "[email protected]",
"username": "username",
"title": "Outdoorsman",
"description": "A person who does stuff outdoors",
"age": 31,
"experience_duration": "5 years"
}
Payload: an object with the following credentials:
Required:
full_name
,title
,description
,age
,experience_duration
{
"full_name": "Sean McDonnell",
"email": "[email protected]",
"title": "Outdoorsman",
"description": "A person who does stuff outdoors",
"age": 31,
"experience_duration": "5 years"
}
Return:
{
"full_name": "Sean McDonnell",
"email": "[email protected]",
"title": "Outdoorsman",
"description": "A person who does stuff outdoors",
"age": 31,
"experience_duration": "5 years"
}
Return:
{
"id": 2,
"title": "Lake Michigan",
"description": "Kayaking at the lake",
"private": false,
"type": "Kayaking",
"start_date": "2019-07-20",
"end_date": "2019-07-20",
"duration_hours": 12,
"duration_days": 0,
"user_id": 1
}
Payload: an object with the following credentials:
Required:
title
,description
,private
,type
,start_date
,end_date
,duration_hours
,duration_days
{
"title": "Something",
"description": "Kayaking at the lake",
"private": false,
"type": "Kayaking",
"start_date": "2019-07-20",
"end_date": "2019-07-20",
"duration_hours": 12,
"duration_days": 0
}
Return:
{
"id": 2,
"title": "Something",
"description": "Kayaking at the lake",
"private": false,
"type": "Kayaking",
"start_date": "2019-07-20",
"end_date": "2019-07-20",
"duration_hours": 12,
"duration_days": 0,
"user_id": 1
}
Return: Returns confirmation message that trip was deleted