Meet SIRI's distant cousin, LIRI! LIRI is a Language Interpretation and Recognition Interface that can give you details and information for concerts, songs, and movies.
Full Demo: Link
LIRI is a command line node app that takes in User inputted parameters and displays data from APIs. LIRI can "understand" the following commands:
- concert-this artist/band name --> displays upcoming concert of artist/band
- spotify-this-song song title --> displays song information
- movie-this movie title --> displays movie details
- do-what-it-says --> reads from a text file and runs respective function
Full Demo: Link
'concert-this' command line input: demo
'concert-this' default: demo
'spotify-this-song' command line input: demo
'spotify-this-song' default: demo
'movie-this' command line input: demo
'movie-this' default: demo
'do-what-it-says' command line input: demo
Easter Egg: 'say-hi' command line input: demo
- Node.js
- File System (fs)
- NPMs - all NPMs
- Axios
- Moment
- Node Spotify API
- DotEnv
- APIs
- Bands In Town API
- Spotify API
- OMBD API
-
process.argv[] is used to access and capture the command line user inputs. The command line user inputs are stored in variables 'command' and 'search' to be later used in the functions and the main process.
- The 'command' variable is used in the main process to call a particular function using 'If-Else Statements.'
- The 'search' variable is used in the API request.
-
File System(fs) (Link) is built into Node.js and is used to read the file of 'random.txt' in the 'doThis()' function that is triggered by the 'do-what-it-says' command.
-
'package.json' was created using command 'npm init' to save all NPMs and dependencies.
-
Then, all NPMs were installed using command 'npm install '.
-
NPMs were accessed in JavaScript file with a "require" function.
-
Axios NPM (Link) is used to make a .get and .then request from an external API.
- It is used here to access: Bands in Town API for the 'concertThis()' function that is triggered by the 'concert-this' command,
- and OMBD API for the 'movieThis()' function that is triggered by the 'move-this' command.
-
Moment NPM (Link) is used to reformat dates. It is used here 'concertThis()' function to reformat the dates in the Bands In Town API to: MM/DD/YYYY.
-
Node Spotify NPM (Link) enables the use of the API library for the Spotify REST API.
-
DotEnv NPM (Link) loads environment variables from a .env file into process.env, storing configuration in the environment separate from code. This is used to access hidden Spotify API keys.
About the Developer: Link