h2non / youtube-video-api

Simplified programmatic and command-line interface for YouTube Video API. Built for node.js
MIT License
67 stars 16 forks source link

Error: Missing required param: email #12

Closed symbianm closed 9 years ago

symbianm commented 9 years ago

I have an error "Missing required param: email" if I init youtube in this way:

 var youtube = Youtube({
        video: {
            part: 'status,snippet'
        },
        email: 'some email',
        password: 'some pass'
    });

If you fix lines 117 and 118 in index.js file to these, it will work

email: this.opts.email || process.env.GOOGLE_LOGIN_EMAIL,
password: this.opts.password || process.env.GOOGLE_LOGIN_PASSWORD,
h2non commented 9 years ago

Oh, great! It was was fault, since I'm using it as environment variable. Will merge the PR. Thanks!

h2non commented 9 years ago

Done! New version is available in npm. Thank you!