New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

imdbtr

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imdbtr - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

test/api.spec.js

14

package.json
{
"name": "imdbtr",
"version": "1.1.0",
"version": "2.0.0",
"description": "IMDB on terminal",

@@ -25,7 +25,7 @@ "license": "MIT",

"dependencies": {
"chalk": "^1.1.3",
"chalk": "^2.4.1",
"figures": "^2.0.0",
"got": "^6.3.0",
"got": "^9.2.1",
"minimist": "^1.2.0",
"ora": "^0.3.0"
"ora": "^3.0.0"
},

@@ -38,5 +38,5 @@ "keywords": [

"devDependencies": {
"ava": "^0.16.0",
"sinon": "^1.17.4",
"xo": "^0.17.0"
"ava": "^0.25.0",
"sinon": "^6.3.3",
"xo": "^0.23.0"
},

@@ -43,0 +43,0 @@ "bin": {

@@ -18,3 +18,11 @@ # imdbtr

```
$ imdbtr 'The Godfather'
Usage
$ imdbtr [OPTIONS]
Example:
$ imdbtr "The Godfather" --year 1972
Options:
-y --year Filter movie by year
-h --help Display usage details
```

@@ -33,3 +41,3 @@

- API provided by [The IMDB API](http://www.theimdbapi.org/);
- API provided by [OMDb API](http://www.omdbapi.com/);
- Some modules by [@sindresorhus](https://github.com/sindresorhus).

@@ -36,0 +44,0 @@

@@ -5,3 +5,3 @@ 'use strict';

const provider = 'http://www.theimdbapi.org/api/find/movie?';
const provider = 'http://www.omdbapi.com/?apikey=315796c1&';
const headers = {

@@ -18,6 +18,6 @@ 'user-agent': 'https://www.github.com/fernahh/imdbtr'

const result = response.body;
return result === null ? false : result[0];
return result.Response === 'False' ? false : result;
})
.catch(err => {
return err.body;
.catch(error => {
return error.body;
});

@@ -24,0 +24,0 @@

@@ -27,3 +27,4 @@ 'use strict';

}
return `${paramNameMap[key] || key}=${value}`;
const param = paramNameMap[key] || key;
return `${param.charAt(0)}=${value}`;
})

@@ -30,0 +31,0 @@ .join('&');

@@ -31,19 +31,19 @@ 'use strict';

const movieRes = `
${chalk.black.bgYellow.bold(result.title)} (${result.year}) on IMDb:
${chalk.black.bgYellow.bold(result.Title)} (${result.Year}) on IMDb:
${chalk.yellow(`${figures.star} ${result.rating}`)}
${chalk.yellow(`${figures.star} ${result.imdbRating}`)}
Duration: .... ${result.length} min
Director: .... ${result.director}
Writer: ...... ${result.writers.join(', ')}
Stars: ....... ${result.stars.join(', ')}
Genre: ....... ${chalk.italic(result.genre.join(', '))}
Storyline: ... ${result.storyline}
Duration: .... ${result.Runtime} min
Director: .... ${result.Director}
Writer: ...... ${result.Writer}
Stars: ....... ${result.Actors}
Genre: ....... ${chalk.italic(result.Genre)}
Plot: ... ${result.Plot}
`;
console.log(movieRes);
}).catch(err => {
}).catch(error => {
spinner.stop();
console.error(chalk.red.bold('Something went wrong :('));
console.error(err);
console.error(error);
});

@@ -50,0 +50,0 @@ };

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc