Mind the Gap — a CLI app using the TFL API — Part 1

artismarti
2 min readNov 25, 2018

--

A brief intro about the project that I worked on for the end of Module 1 at FlatIron School. This post is mainly about the planning. I’ll write about the (very unrefactored) code in the next post.

Photo by Suad Kamardeen on Unsplash

If you had told me while I was struggling through iterating through hashes whilst I was doing the prep work for FlatIron school, that I would create a CLI project using the TFL API and rely heavily on hashes — I would’ve laughed. Or maybe cried…

Tweet about my dream/nightmare of hashes.

I wanted to use an API for the project because it would be a fun learning experience & at my last job my team had used the TFL API to figure out which tube stations were closed or had delays. So I decided to give it a shot.

It helps to have been a Product Manager

My previous experience in the tech industry meant that the first thing I wanted to do before we wrote any code was to figure out what the MVP would be, followed by version 2 and finally stretch goals. My team mate, Mayowa, and I agreed on the following goals for MVP, Version 2, Stretch Goals & Super Stretch Goals:

MVP

Creating the classes, relationships and the methods to answer the following questions, with dummy seeded data:

  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. What Tube Lines have the least stations?

Version 2:

  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):

  1. Get Live Service data from TFL API to show disruptions⚠️.
  2. Use emojis 😎in the 🌟 CLI (obviously!)

Super Stretchy Goals:

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

All of this in Trello:

Best kinda Trello board — with most stuff in “Done”

Final App Preview:

Emojis! Colours!

Read about the MVP here.

--

--

artismarti

Software Developer, Product Manager, biryani loving, फ़ेमिनिस्ट किल जॉय. Jill of all trades. Mistress of some.