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

API Key: Add utility method for checking it is set #404

Merged
merged 3 commits into from
Sep 27, 2021

Conversation

GaryJones
Copy link
Contributor

@GaryJones GaryJones commented Sep 25, 2021

Description

Add utility method for checking the API key is saved in the parsely options, and a second utility method for checking if it is missing.

Adds a third utility method for retrieving the API key.

Includes unit tests.

In the future, these methods may be moved to a Parsely_Options or similar class.

Motivation and Context

These methods can be used by various other classes and methods to see if this key trigger of behaviour changes is available, and provides the key as needed.

Closes #395.

How Has This Been Tested?

Integration tests pass, and work on #406 which utilises the new methods.

Screenshots (if appropriate):

Screenshot 2021-09-25 at 22 29 04

Screenshot 2021-09-26 at 00 02 26

Also add utility method for checking if it is missing.

Includes unit tests.

Closes #395.
@GaryJones GaryJones added this to the 2.6.0 milestone Sep 25, 2021
@GaryJones GaryJones self-assigned this Sep 25, 2021
@GaryJones GaryJones requested a review from a team as a code owner September 25, 2021 19:42
Copy link
Contributor

@pauarge pauarge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good. Should we find places where we're checking for the API key in our code and replace it with this functions in this PR or on a subsequent one?

@GaryJones
Copy link
Contributor Author

Should we find places where we're checking for the API key in our code and replace it with this functions in this PR or on a subsequent one?

That can be a subsequent PR.

@pauarge pauarge merged commit 33f85e9 into develop Sep 27, 2021
@pauarge pauarge deleted the feature/api_key_is_set_or_missing branch September 27, 2021 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create utility method for checking for saved API key
2 participants