ritiek / rafy-rs

Rust library to download YouTube content and retrieve metadata
MIT License
50 stars 10 forks source link

Remove API key #3

Open RndFooBar opened 7 years ago

RndFooBar commented 7 years ago

Providing you youtube API key through this crate has several disadvantages:

I would therefore highly recommend you to remove your youtube API key from the source code and instead let the user input theirs.

ritiek commented 7 years ago

@RndFooBar I guess you're right. I'll try to parse the information from the video's HTML page itself. If that doesn't work correctly, I'll stick with having users input their own key.

ritiek commented 7 years ago

But how will Travis CI tests run?

ids1024 commented 7 years ago

Travis has encryption support for things like API keys.

https://docs.travis-ci.com/user/encryption-keys/

ritiek commented 7 years ago

@ids1024 Thanks! I didn't know about that feature in Travis CI (no pun intended) but after looking for all this while, I am not sure if I should remove the API key.

I've also noticed a lot of open-source software with embedded API keys (even official YouTube Kodi addon and many other tools using YouTube API, I am looking at you @ids1024 :smile:).

At the moment, this library does not have many users, so I am not concerned about the limited API calls and since I made a separate Google account to generate the keys used in this library, I do not really mind until somebody abuses it to the extent that they send me a notice (they will probably just ban the API key anyway).