Nicholas Scalione
2 min readFeb 8, 2021

--

Cli Project

I created a gem involving my favorite basketball team the NY Knicks. My initial plan was to make it about the whole NBA but as I began my project I realized it might be a bit complicated considering I wasn’t a fan of the APIs I was finding and this led to me changing mid week from using an API to using an API and Scraping to just Scraping.

I really did not understand the student scraper lab but the basketball fan in me wanted accurate, exact info so I decided to scrape from my favorite site. This was the part of the project I ended up enjoying the most, and with the help of my cohort I was able to scrape multiple tables and data templates from the site and increase my comfortability in performing the task. I quickly saw how all sites are different and my next experience might not be so pleasant but I look forward to the task. I really enjoyed exploring Nokogiri and using it to parse HTML while using CSS to select precise information in creating my gem. This project also brought the idea of creating an object and assigning it attributes full circle for me. I was able to scrape basic player attributes about each Knick and send the hash as an argument to my player class and to initialize and create the player. From there, seeing that i was able to then call on that players’ stats and salary (because i had those attributes already set with attr_accessor) without having to create a new object really cemented the idea of OO.

I hope you like my app. When firing it up, you are greeted by the wonderful Walt Clyde Frazier who takes you on a stroll down Knicks lane. You can look up basic Knicks info or you can decide to take a look at a specific player. A list of players are provided, from there you choose one, and you can see not only basic player information but your choice of 2 different sets of stats or even that player’s yearly salary.

--

--