Skip to content

PLKGIT/liri-node-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Liri Bot

Overview

Language Interpretation and Recognition Interface (LIRI) is a command line node application that accepts parameters and returns matching data via application programming interfaces (APIs). The resulting data is returned to the user via console.log and appended to a log file.

Features

LIRI includes four (4) features:

  1. concert-this - accepts the name of a singing artist or band and returns the following concert information using the "Bands In Town" API.
    • Venue name
    • Venue location
    • Concert date, formatted as "MM/DD/YYYY"
  2. spotify-this-song - accepts a song/track name and returns the following information using the "Spotify" API.
    • Artist(s)
    • Song name
    • Song preview link on Spotify
    • Album name
  3. movie-this - accepts a movie name and returns the following movie information using the "OMDB" API.
    • Title
    • Year
    • IMDB Rating
    • Rotten Tomatoes Rating
    • Country where produced
    • Language
    • Plot
    • Actors in the movie
  4. do-what-it-says reads the contents of random.txt, which contains the name of a LIRI feature and an input parameter, and then calls the feature using the supplied input parameter.

Using LIRI

LIRI is launched by running one of the following commands on the command line:

  1. node liri concert-this artist/band name
  • Calls the concertThis() function
  • Checks for missing artist name
  • Checks for missing user input
  • Console logs an error message to the screen if no artist/band name was provided
  • Formats the user's input, replacing spaces with "+"
  • Builds a query URL with the user's input and required API key
  • Makes an async call with the Axios NPM to the Bands In Town API
  • Console logs an error message if the response fails to return any concert dates
  • Console logs the response to the screen
  • Appends the response to the log.txt file
  1. node liri spotify-this-song song name
  • Calls the spotifyThis() function
  • Checks for missing song name
  • Checks for missing user input and defaults to "The Sign" if no song name was provided
  • Formats the user's input, checking for multi-word titles
  • Makes an async call with Spotify NPM to the Spotify API
  • Console logs an error message if the response fails to return any tracks
  • Console logs the response to the screen
  • Appends the response to the log.txt file
  1. node liri movie-this movie name
  • Calls the movieThis() function
  • Checks for missing movie name
  • Checks for missing user input
  • Checks for missing user input and defaults to "Mr. Nobody" if no movie name was provided
  • Formats the user's input, replacing spaces with "+"
  • Builds a query URL with the user's input and required API key
  • Makes an async call with the Axios NPM to the OMDB API
  • Console logs an error message if the response fails to return any movies
  • Console logs the response to the screen
  • Appends the response to the log.txt file
  1. node liri do-what-it-says
  • Calls justDoIt() function
  • Reads contents of /files/random.txt
  • Calls the liri feature (value 1) using the provided input (value 2) in the file (e.g. spotify-this-song,I Want It That Way)

Technology

  1. LIRI Bot
  1. Display Results Page
  • HTML5
  • CSS3
  • JavaScript
  • jQuery
  • Google Fonts
  • Google Icons
  • Materialize CSS/JS

LIRI Results

LIRI Bot is a command line application; accordingly, its commands cannot be run in a web browser. Therefore, I have created a website at https://plkgit.github.io/liri-node-app/ that contains screenshots of the results of each command as well as a PDF copy of the log.txt file.

Alternatively, see below for results screenshots and a PDF copy of the log.txt file after running each command.

  1. node liri Video: Result 01

  2. node liri concert-this Video: Result 02

  3. node liri concert-this U2 Video: Result 03

  4. node liri concert-this Billy Joel Video: Result 04

  5. log.txt contents after concert-this

  6. node liri spotify-this-song Video: Result 06

  7. node liri spotify-this-song Blue Bayou Video: Result 07

  8. node liri spotify-this-song 1zz6 Video: Result 08

  9. log.txt contents after spotify-this-song

  10. node liri movie-this Video: Result 10

  11. node liri movie-this WooFoo Video: Result 11

  12. node liri movie-this Tootsie Video: Result 12

  13. log.txt contents after movie-this

  14. node liri do-what-it-says (spotify-this-song,I Want it That Way) Video: Result 14

  15. node liri do-what-it-says (movie-this,Dave) Video: Result 15

  16. node liri do-what-it-says (concert-this,Maroon 5) Video: Result 16

  17. node liri do-what-it-says (empty file) Video: Result 17

  18. log.txt contents after do-what-it-says

PDF of final log.txt

Download PDF

Development Details

Developer

Pam Kelly at esq.kelly@gmail.com

GitHub Repository

GitHub at https://github.com/PLKGIT/liri-node-app.

Display Results website

LIRIBOT Results at https://plkgit.github.io/liri-node-app/

Porfolio

Professional Porfolio at https://www.pamkelly.com/portdev.html

Copyright © 2020 Pamela L. Kelly