Git Product home page Git Product logo

6_6_lex_trip-api's Introduction

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.herokuapp.com/trips

Retrieve list of all Trips by continent

get https://trektravel.herokuapp.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.herokuapp.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.herokuapp.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.herokuapp.com/trips/{id}

Retrieve all reservations of a Trip

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

Add a New Trip package to be listed

post https://trektravel.herokuapp.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.herokuapp.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. It's an API built in Ruby on Rails!

6_6_lex_trip-api's People

Contributors

pilgrimmemoirs avatar cheezitman avatar tildeee avatar hamled avatar anselrognlie avatar kyra-patton avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.