mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Set User-Agent for API requests to DNSimple (#5927)
* Set the user-agent for API requests to DNSimple * Update user agent format * Add changelog fragment * Update changelogs/fragments/5927-set-user-agent-dnsimple.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
24efe9ee9a
commit
33df7b61c0
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/5927-set-user-agent-dnsimple.yml
Normal file
2
changelogs/fragments/5927-set-user-agent-dnsimple.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- "dnsimple - set custom User-Agent for API requests to DNSimple (https://github.com/ansible-collections/community.general/pull/5927)."
|
|
@ -168,7 +168,7 @@ class DNSimpleV2():
|
|||
def dnsimple_client(self):
|
||||
"""creates a dnsimple client object"""
|
||||
if self.account_email and self.account_api_token:
|
||||
client = Client(sandbox=self.sandbox, email=self.account_email, access_token=self.account_api_token)
|
||||
client = Client(sandbox=self.sandbox, email=self.account_email, access_token=self.account_api_token, user_agent="ansible/community.general")
|
||||
else:
|
||||
msg = "Option account_email or account_api_token not provided. " \
|
||||
"Dnsimple authentiction with a .dnsimple config file is not " \
|
||||
|
|
Loading…
Reference in a new issue