Coder Social home page Coder Social logo

liri-node-app's Introduction

LIRI Node Application

An interactive Node-based command-line (CLI) application that takes in parameters and gives you back data.

What is LIRI?

LIRI is like iPhone's SIRI. However, while SIRI is a Speech Interpretation and Recognition Interface, LIRI is a Language Interpretation and Recognition Interface.


How This App Works

In this app, LIRI will search Spotify for songs, Bands in Town for concerts, and OMDB for movies. LIRI will take these four commands: concert-this, spotify-this-song, movie-this, and do-what-it-says.

concert-this

  • The node liri.js concert-this '<artist/band name here>' command will search the Bands in Town Artist Events API for an artist and render the following information about each event to your terminal/bash window:
    • Name of the venue
    • Venue location
    • Date of the Event (use moment to format this as "MM/DD/YYYY")

spotify-this-song

  • The node liri.js spotify-this-song '<song name here>' command will output the following information about the song in your terminal/bash window:
    • Artist(s)
    • The song's name
    • A preview link of the song from Spotify
    • The album that the song is from

If no song is provided then your program will default to "The Sign" by Ace of Base.

do-what-it-says

  • The node liri.js movie-this '<movie name here>' command will search the OMDb API for a movie and show the following information to your terminal/bash window:
    • Title of the movie
    • Year the movie came out.
    • IMDB Rating of the movie
    • Rotten Tomatoes Rating of the movie
    • Country where the movie was produced
    • Language of the movie
    • Plot of the movie
    • Actors in the movie

If the user doesn't type a movie in, the program will output data for the movie 'Mr. Nobody.'

do-what-it-says

  • The node liri.js do-what-it-says command will take the text inside of random.txt and then use it to call one of LIRI's commands.

Technical Approach

  • Run npm init -y to initialize a package.json file for your project. The package.json file is required for installing third party npm packages and saving their version numbers. If you fail to initialize a package.json file, it will be troublesome, and at times almost impossible for anyone else to run your code after cloning your project.
  • Make a .gitignore file and add node_modules, .DS_Store, .env to it. This will tell git not to track these files, and thus they won't be committed to Github.
  • Use these node packages to retrieve the data that will power this app
    • Node-Spotify-Api
    • Request
    • Moment
    • DotEnv
  • Create .env file to be used by the DotEnv package to set what are known as environment variables to the global process.env object in node. These are values that are meant to be specific to the computer that node is running on, and since we are .gitignoring this file, they won't be pushed to github โ€” keeping our API key information private. If someone wanted to clone this app from github and run it themselves, they would need to supply their own .env file for it to work.

Author

Keen Wilson

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.