Closed
Conversation
- dcv.start_validation_email - dcv.submit_validation_email
coreone
requested changes
Oct 21, 2024
Comment on lines
178
to
199
| def get_domains (self, acme_id, **kwargs): | ||
| """List ACME account’s domains. | ||
|
|
||
| :param int acme_id: The ID of the acme account to list domains | ||
| """ | ||
| self.__acc_domains = [] | ||
| result = self.__find_domains(acme_id) | ||
| for dom in result: | ||
| self.__acc_domains.append(dom) | ||
| return self.__acc_domains | ||
|
|
||
| @paginate | ||
| def __find_domains(self, acme_id, **kwargs): | ||
|
|
||
| params = { | ||
| self._find_params_to_api[param]: kwargs.get(param) | ||
| for param in self._find_params_to_api # pylint:disable=consider-using-dict-items | ||
| } | ||
| url = self._url(f"{acme_id}", "domain") | ||
| result = self._client.get(url, params=params) | ||
| return result.json() | ||
|
|
Member
There was a problem hiding this comment.
This should all probably be one function named get_domains that uses the @paginate wrapper. Additionally, we probably shouldn't cache the results in self.__acc_domains since this data would change if a different ACME ID was provided, correct? This should probably just accumulate a list of domains in a local variable and then return at the end.
do not store results
DomainControlValidation.all use search instead __search Remove __search method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dcv using email method
dcv.all
acme.get_domais