Skip to content

watheuer/travel-one

Repository files navigation

Travel One

The purpose of this application is to give users the options to plan the best trips to fit their budget and properly and easily allocate their money to save for their dream destinations. This app uses Capital One's Nessie Hackathon API, the Sabre Developer API and the Google Places API. The backend uses a RESTful API built with Ruby on Rails to communicate with a front end implemented in Angular.js.

GET /api/vacations

Returns the vacations planned for the current user.

[
  {
    "id":1,
    "origin":"RIC",
    "destination":"LAX",
    "fare":"400.0",
    "departure_time":"2016-04-02T00:00:00.000Z",
    "return_time":"2016-04-09T00:00:00.000Z",
    "user_id":1,
    "created_at":"2016-02-27T14:24:36.941Z",
    "updated_at":"2016-02-27T14:24:36.941Z"
  }
]

POST /api/vacations

Creates a new vacation. The user must be logged in. The required attributes are:

{
  "origin": "RIC",
  "destination": "LAX",
  "fare": 400.00,
  "departure_time": "2016-04-02",
  "return_time": "2016-04-09"
}

GET /api/vacations/[id]

Returns the vacation with the specified id.

DELETE /api/vacations/[id]

Deletes the vacation with the specified id.

GET /api/accounts

Shows all accounts associated with the current user.

[
  {
    "_id": "56c66be6a73e492741507daf",
    "rewards": 17337,
    "balance": 20444,
    "customer_id": "56c66be5a73e492741507380",
    "nickname": "Mr.'s Account",
    "type": "Checking"
  }
]

GET /api/accounts/[id]

Shows a single account.

POST /api/accounts

Creates a new, empty savings account.

Request:

{
    "nickname": "Travel"
}

Response:

{
  "code": 201,
  "message": "Account created",
  "objectCreated": {
    "type": "Savings",
    "nickname": "Travel",
    "rewards": 0,
    "balance": 0,
    "customer_id": "56c66be5a73e492741507380",
    "_id": "56d1b978480cf02f0f8879f6"
  }
}

About

Travel One: submission for VTHacks III in February 2016. Won first place for use of the Capital One API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors