Skip to content

Uses the TFL API to query info on lines and stations - including live disruptions.

License

Notifications You must be signed in to change notification settings

artismarti/tfl-cli-project

 
 

Repository files navigation

🚇 Mind The Gap 🚇

Using the TFL - API for the FlatIron Module 1 Final Project

The TFL API is called via Ruby to populate a hash with line names and station names.

The API is also used to get information about live disruptions.

MVP, Next Mission and Stretch Goals

MVP

For the MVP the aim was creating the classes, relationships and the methods to answer the following questions:

  1. What stations are on a Tube Line? ✅
  2. What lines does a Tube Station belong to? ✅
  3. What Tube Stations have the most Lines? ✅
  4. What Tube Stations have have least Lines? ✅
  5. What Tube Lines have the most Stations? ✅
  6. WhatTube Lines have the least stations? ✅

Next Mission

Once the MVP was complete, the mission was:

  1. Get real data from the TFL API ✅
  2. Populate tables with this real data ✅
  3. Perform Validation ✅
  4. Make the CLI look clean & ✨ ✨sparkly. ✅
  5. Show line colours in CLI. ✅

Stretch Goal(s):

The main stretch goals are:

  1. Get Live Service data from TFL API to show 🚫 disruptions⚠️. ✅
  2. Use emojis 😎in the 🌟 CLI ✅

Super Stretchy Goal:

  1. 💡 Incorporate DLR and Overground data. 🚧
  2. Clean up the code. 😱 😭 🚧

Gems Used:

gem "sinatra-activerecord"
gem "sqlite3"
gem "pry"
gem "require_all"
gem 'rest-client'
gem 'json'
gem 'artii'
gem 'rainbow'

Walkthrough:

Menu 📋

Menu

What stations are on a Tube Line? 🚉

Menu

2. What lines does a Tube Station belong to? 🚠 🚠 🚡

Menu

3. What Tube Stations have the most Lines? 🚇 🚇 🚇

Menu

4. What Tube Stations have have least Lines? 🚇

Menu

5. What Tube Lines have the most Stations? 📈 🚇

Menu

6. What Tube Lines have the least stations? 📉 🚇

Menu

7. View Service Status for all Tube Lines ⚠️

Menu

9. Exit 👋

Menu

About

Uses the TFL API to query info on lines and stations - including live disruptions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%