DEV Community

Christopher Mrakovcic
Christopher Mrakovcic

Posted on

Mod 1 Project Blog

The Mod1 project was fun to make but also required using my knowledge and resources to create my own CLI Application. I decided to use a Score Bat API so that my CLI would have access to external data. Score Bat is a website for viewing Soccer Videos.
The API gave me access to an array of information containing video/highlight titles, and information on videos such as a link of the video, the competitors, the date, etc. This was used in my CLI as a result of the user choosing a specific option. I started by pasting the url to the API. Then I parsed the original API array so that my API would return a list containing only the video titles. Then I called that list in my CLI as a result of the user choosing another specific option. The last option I made possible was the exit option, which prints a goodbye message. For this option I used the sleep function and the system “clear” function. The sleep function makes the system wait however many seconds you desire before the next action occurs. System “clear” has the power to automatically clear everything in the user’s terminal prior to that action. One of the most interesting gems I found along the way is TTY-Prompt. TTY-Prompt has a wide range of functionality and you are capable of doing a lot with this gem. I used TTY-Prompt for the options and scrolling functionality of my CLI. You can view the functionality of TTY-Prompt at “https://github.com/piotrmurach/tty-prompt”. The TTY-Prompt can be found at “https://rubygems.org/”. When I first started my project I felt confident, but after running to multiple errors one after another I began to lose some confidence. With a bunch of trial and error I had finally got my project running. I am very satisfied with the result, but I do wish I had just a bit more time. Overall, I am happy with how my first project came out.

Top comments (0)