Skip to content

bbenalia/node-moviedb-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Command Line Application with Node.js

This project help us to understand nodeJs.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

We will be building a CLI(command line) app that takes user input, which will be a page (or some other parameters), using a flag argument and uses this argument to make a http request to a REST API, the api we will be using is provided by www.themoviedb.org . The api provides information on a movie/person as requested using a parameter. We would consume this API to get the population of a country.

To parse CL arguments we will use Commander, a node package. To make http requests we will use Http Node Module .

Here's why:

  • Learn more about the asyncronous workflow of Node.js
  • Interact easily with 3rth APi's.
  • Learn how to manipulate Tokens.

Built With

This section should list any major frameworks that you built your project using. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.

  • Node.js
  • Commander.Js
  • Dotenv
  • node-notifier
  • ora spinners
  • prettier

Getting Started

First of all you need to have installed node and git into your PC.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • npm
    npm install npm@latest -g

Installation

  1. Get a free API Key at https://www.themoviedb.org/
  2. Clone the repo
    git clone https://github.com/bbenalia/node-moviedb-cli
  3. Install NPM packages
    npm install
  4. Enter your API in .env
    const API_KEY = 'ENTER YOUR API';

Usage

  • ./moviedb.js command... ---options... --flags...

  • ./moviedb.js get-persons --page 1 --popular

  • ./moviedb.js get-persons --page 2 --popular

  • ./moviedb.js get-person --id XXXXXXXX

  • ./moviedb.js get-person --id 990393

  • ./moviedb.js get-movies --popular --page 2

  • ./moviedb.js get-movies --now-playing --page 2

  • ./moviedb.js get-movie --id movieId

  • ./moviedb.js get-movie --id 694919

If you want to save your data request use:

--save --local

For more examples, please refer to the Documentation

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Team Contact

Thanks goes to these wonderful people (emoji key):


haykbit

💻

imalovelyghost

💻

Project Link: https://github.com/your_username/repo_name

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%