rafy-rs
rafy-rs copied to clipboard
Remove API key
Providing you youtube API key through this crate has several disadvantages:
- The number of API calls are limited which means that this crate won't be able to serve a large amount of users.
- The API key is bound to your Google account, which would make you responsible for possible abuses.
I would therefore highly recommend you to remove your youtube API key from the source code and instead let the user input theirs.
@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.
But how will Travis CI tests run?
Travis has encryption support for things like API keys.
https://docs.travis-ci.com/user/encryption-keys/
@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).