Use of API Key through SDK?
See original GitHub issueHey, there!
From my understanding, it is not possible to pass the API key generated in the website to the EventRegistry SDK, right? Unless I have it stored in a settings.json
file in the same directory as the EventRegistry.py
file, that is (which I only found out reading the code’s comments, I think this should also be in the wiki somewhere). This makes the SDK pretty useless if you intend to do more than 20 searches a day (in which case you’d need to use your API key), right?
I’d strongly recommend that you add a parameter to the EventRegistry.__init__()
for the apiKey. Also, it would be great if the wiki mentioned the need for an API key, because I only found out about it once my 20 requests were done and I accidentally found the section of the control panel where you can find the API key.
Finally, it’s not clear to me: is it possible to group terms in the keywords
parameter? Can I do something like q = QueryArticles(keywords="'new york' baseball 'mets stadium'"
?
Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:6
Top GitHub Comments
Luca, we’ve changed the library so that now the API key is the only way to issue API requests. thank you again for your suggestions.
Yes, the API Key can be captured, but one can only do so much with it (like using all of your requests’ daily quota). Having access to the account name and password allows someone to do much more, like deleting your account or doing all kinds of stuff to it on your behalf. Even if there are not many things that can be done in the account’s control panel at the moment, there might be one day, so this is a potential threat. And also, the apiKey could be encrypted in the same way as I’ve suggested for the acc/password, which would result in twice as much security.
In any case, these are just some suggestions, the ultimate design decisions are, obviously, yours. Thanks for pushing it to pip!
Cheers, Luca