Skip to content

Untapped-Island/cli-application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CLI Application

This repository is to run our CLI interface. This repo specifically allows users to search cards from the command line.

The cli is intended to help search the database and make api calls to get the specific card or cards. Once the card(s) are found user can add them to their portfolio and either quit out of the application or continue to add more cards to their profile.

Documentation

We used inquirer to build our CLI.

Inquirer provides the user interface and the inquiry session flow.

  • providing error feedback
  • asking questions
  • parsing input
  • validating answers
  • managing hierarchical prompts

Inquirers question objects can contain:

type: name: message: choices:

inquirer
.prompt([
  /* Pass your questions in here */
])
.then((answers) => {
  // Use user feedback for... whatever!!
})
.catch((error) => {
  if (error.isTtyError) {
    // Prompt couldn't be rendered in the current environment
  } else {
    // Something else went wrong
  }
});

UML

Setup

  npm install inquirer@^8.0.0
  npm install axios
  const inquirer = require('inquirer');
  const axios = require('axios');

Tests

No Tests for the CLI

Further Goals

Stretch Goals would be to create routes for all colors (cards with dual or more than one color type), create a route for all types, subtypes, and manacost.

Structure Diagram

UML

About

inquirer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •