Skip to content

Commit

Permalink
Merge pull request #23 from etienne-gauvin/master
Browse files Browse the repository at this point in the history
Updated the LiveDNS API to reflect the latest changes at https://api.gandi.net/docs/livedns/
  • Loading branch information
Danamir authored May 21, 2021
2 parents c91a769 + beaed13 commit 240e223
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.ini-dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[api]
url = https://dns.api.gandi.net/api/v5
url = https://api.gandi.net/v5/livedns/
; Generate your Gandi API key via : https://account.gandi.net/en/users/<user>/security
key =

Expand Down
2 changes: 1 addition & 1 deletion dyn_gandi.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def livedns_handle(domain, ip, records):
if r_snap is None:
raise RuntimeWarning("Could not create snapshot." % domain)

snapshot_uuid = r_snap['uuid']
snapshot_uuid = r_snap['id']

if verbose:
print("Backup snapshot created, uuid: %s." % snapshot_uuid)
Expand Down
2 changes: 1 addition & 1 deletion livedns_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _query_api(self, method, query, json_data=None):
url = "%s%s" % (self.url, urllib.parse.quote(query))

headers = {
"x-api-key": self.key,
"Authorization": "Apikey %s" % self.key,
"Accept": "application/json",
}

Expand Down

0 comments on commit 240e223

Please sign in to comment.