Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potentially unnecessary tripple error. #1

Closed
picatz opened this issue Oct 30, 2017 · 0 comments
Closed

Potentially unnecessary tripple error. #1

picatz opened this issue Oct 30, 2017 · 0 comments

Comments

@picatz
Copy link
Owner

picatz commented Oct 30, 2017

Could probably cleanup the error when a client is initialized without an API key.

[1] pry(main)> require "shodanz"
=> true
[2] pry(main)> client = Shodanz.client.new
No key has been found or provided!
No key has been found or provided!
No key has been found or provided!

This is happening because the client class is simply a proxy to the three other API classes; and so the key is stored once for each API. This allows for multiple API keys to be used by the same client / or for API keys to be changed later.

Maybe this feature could be removed to make things simpler. Or, at least the error could be caught once when the client is initialized.

This needs to be cleaned up further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant