Skip to content

Resource: API for retrieving Trips™ and making reservations, used for the project Trek (https://github.com/AdaGold/trek/)

Notifications You must be signed in to change notification settings

AdaGold/trip-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trip API™

Welcome to the Trip API™™™, that services the Ada Trip Reserving Service!

The Ada Trip Reserving Service does two things very well:

  1. helps tour guides create Trip packages catered to global travelers
  2. helps travelers find Trip packages that fit their needs, and make a reservation for that trip

Read the API documentation for more details.

Actions

Retrieve list of all Trip packages

get https://trektravel.onrender.com/trips

Retrieve list of all Trips by continent

get https://trektravel.onrender.com/trips/continent?query={continent}

Accepted query params:

  • query (string), represents the continent of the trip results to filter by
    • Required
    • Must be one of the following values: "Africa", "Antarctica", "Asia", "Australasia", "Europe", "North America", "South America"

Retrieve list of all Trips by max amount of weeks

get https://trektravel.onrender.com/trips/weeks?query={weeks}

Accepted query params:

  • query (string), represents the max duration of the trips to filter by, in weeks
    • Required
    • Must be a number

Retrieve list of all Trips by max budget

get https://trektravel.onrender.com/trips/budget?query={budget}

Accepted query params:

  • query (string), represents the max budget of the trips to filter by, in whole dollar amount
    • Required
    • Must be a number
    • budget is in dollar amount, above represents $5,000

Retrieve Data on Single Trip From ID

get https://trektravel.onrender.com/trips/{id}

Retrieve all reservations of a Trip

get https://trektravel.onrender.com/trips/{id}/reservations

Add a New Trip package to be listed

post https://trektravel.onrender.com/trips

Accepted query params:

  • name (string), represents the name of your trip
    • Required
  • continent (string), represents the continent that the trip takes place in
    • Required
    • Must be one of the following values: "Africa", "Antarctica", "Asia", "Australasia", "Europe", "North America", "South America"
  • about (string), represents a description of this trip and why someone would join this trip
    • Optional
  • category (string), represents a broad category or tag of this trip
    • Required
  • weeks (integer), represents the duration of this trip in number of weeks
    • Required
    • Must be a number
  • cost (float), represents the cost of this trip in USD
    • Required
    • Must be a number

Reserve a Ticket on a Trip package

post https://trektravel.onrender.com/trips/{trip id}/reservations

Accepted query params:

  • name (string), represents the name of the primary traveler on the trip reservation
    • Required
  • age (integer), represents the age of the primary traveler on the trip reservation
    • Optional
  • email (string), represents the contact email of the primary traveler on the trip reservation
    • Required

Note: Feel free to dive into the source code

If this API documentation seems lacking, feel free to dive into the source code to find out what's going on.

About

Resource: API for retrieving Trips™ and making reservations, used for the project Trek (https://github.com/AdaGold/trek/)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.6%
  • Mako 3.4%