fernahh / imdbtr Goto Github PK
View Code? Open in Web Editor NEWIMDb on terminal.
IMDb on terminal.
It would be great if you add star casts and plot too.
The Movie API provides some params to find a movie. We can provide options to user, like:
imdbtr "Deadpool" -y 2013
TODO
const chalk = require('chalk');
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
issue on node v0.12.2
example:
$ imdbtr "moon" --year 2009
Moon (2009) on IMDb:
★ 7.8
Duration: .... 2h23min
Director: .... Duncan Jones
Writer: ...... Duncan Jones, Nathan Parker
Stars: ....... Sam Rockwell, Kevin Spacey, Dominique McElligott
Genre: ....... Drama, Mystery, Sci-Fi
Plot: ... Astronaut Sam Bell has a quintessentially personal encounter toward the end of his three-year stint on the Moon, where he, working alongside his computer, GERTY, sends back to Earth parcels of a resource that has helped diminish o...
it just cuts off like that.
Examples:
$ imdbtr "garoto cósmico"
Movie not found on IMDB :(
$ imdbtr "españa 1936"
Movie not found on IMDB :(
I've installed imdbtr but any movie I search returns the 'Movie not found on IMDB' error. I may be missing something here, but is anyone else having the same problem?
Using this on Windows, and I'm getting SyntaxError every time I am using imdbtr command followed by the movie name. Example
C:\Users\Anjith Sasindran>imdbtr 'The Godfather'
And this is the error shown
C:\Users\Anjith Sasindran\AppData\Roaming\npm\node_modules\imdbtr\bin\imdbtr:5
const chalk = require('chalk');
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
I am using node version 1.4.28
Now, the API requires a key to access the data.
See <http://www.omdbapi.com/#usage>.
On GitHub I found some valid keys, like 2f6435d9
, df751404
, and 1ca32dee
.
This module is a function that returns a movie from API provider. I think that must be renamed to getMovie
or something like that.
When a movie it's not found, I return false
. I think that is better just an empty object or array.
They got data from the server. Maybe is better just create mocks.
This module is terrible. Just rewrites in a better way.
It's executable. Terrible too. It should just call the main module. We need to:
Just remove. Completely unnecessary.
The main module. It should just call helper functions, something like that:
const getMovie = require('getMovie')(apiKey) // maybe create a npm module for that
const helpers = require('helpers')
const imdbtr = (params) => {
getMovie(helpers.buildQueryParams(params))
.then((data) => {
console.log(helpers.formattedData(data))
})
.catch((error) => {
console.error(error)
})
}
module.exports = imdbtr
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.