How i do provide API key?
schvabodka-man opened this issue · comments
Hi, the app asks me to provide api key, but i really have no clue how to do that and there are no doc page about that
Same issue. "No API key provided"
Please send PR .
Pull request on what?
proving the API key
Hey guys, just to let you know as stated in #2, the API that movie-cli
uses is no longer free, and thus the application no longer works.
Just as some constructive feedback, considering this is your application @mayankchd, providing more information about what sort of PR you want us to create or just any more information about the project status would be appreciated.
#6 Helps with this. Right now though, you would have to change the source code. It would be better if you could put your private APi key in a config file, like ~/.config/movie/config
.
The file could contain:
api_key = 8jasd98asdf
you should update the readme so we would know that the app won't work before installing it...
#6 Helps with this. Right now though, you would have to change the source code. It would be better if you could put your private APi key in a config file, like
~/.config/movie/config
.The file could contain:
api_key = 8jasd98asdf
Any possibility of a walk through on doing so? (changing API in source, I peeked, possibly not in the right place)
Sure!
- Navigate to an empty directory on your computer to keep the source code and run the following command to download the source code for
movie
:
git clone https://https://github.com/mayankchd/movie.git
- Enter the directory:
cd movie/
- Find the
cli.js
file and then locate the section of code where[yourkey]
exists:
Line 43 in c536684
- Then replace it with your API key. The string should look something like this (assuming your API key is
8jasd98asdf
):
'http://www.omdbapi.com/?apikey=8jasd98asdf&t='
- Run the commands to install the dependencies and then to install the CLI to your computer:
npm install
npm link
NOTE: if you get ERR! EACCES -13 or anything like that, make sure you put
sudo
before the command. This error can happen when you're not running the command as an administrator.
- You should now be able to use the movie CLI 😄
@FutureQueenBee @sam3d Have fixed this. Added a default key.. Need to make key configurable from CLI though.