Time for (cue dramatic orchestral music)….The CLI project

Daniel Gould
2 min readAug 21, 2020

Ok, the training wheels are off. It was time to dig into my first real foray into coding. There were no learn tests to help guide me through the process. No helpful readme’s to steer me in the right direction. Just me and a blank VS code screen. Ok, here we go!

I knew right off the bat since I am a huge Lakers fan that I wanted to create an NBA app that would gather information about your favorite NBA team, then from there gather attributes about the player of your choosing. After extensive reading on the best API’s for basketball, I decided to go with the Rapid NBA API. It had all the information that I needed to get this project off the ground and running. I was ready to rock and feeling real confident that I could knock this project out in a couple of days. But then…..(cue some more orchestral dramatic music; preferably with trombones and timpani) reality set in.

Wow! Navigating through API’s turned out to be a lot harder than I initially thought. First off, the amount of information you can get on Basketball is EXTENSIVE. Why would someone need to know their favorite player's mother's maiden name? That information doesn’t actually exist, but it gives you a little perspective on the amount of useless information out there.

Siphoning through all the information to pull out what I needed took a while. Then figuring out how to convert that information into Ruby friendly code to get the exact responses I needed took even longer. Eventually, I found my way, here is a little snippet of the first API code I used for this project:

Of course, this particular API had some empty columns hence the tail end of the method.

Once I got all the information I wanted to present, it was just a matter of creating Objects around that data to present it in a fun way. I wanted to involve the user as much as I could throughout this application so it could be fun.

If you’d like to check out the finished gem you can see it here!

https://github.com/Dmg5th/CLI_NBA

--

--