Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit 6edde36

Browse files
committed
/certificates only needs X-Auth-User-Service-Key header, no email or token
1 parent 9893b45 commit 6edde36

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CloudFlare/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ def _call_with_auth(self, method, api_call_part1, api_call_part2=None, identifie
3636
return self._call(method, headers, api_call_part1, api_call_part2, identifier1, identifier2, params, data)
3737

3838
def _call_with_certauth(self, method, api_call_part1, api_call_part2=None, identifier1=None, identifier2=None, params=None, data=None):
39-
if self.EMAIL is '' or self.CERTTOKEN is '':
39+
if self.CERTTOKEN is '':
4040
raise CloudFlareAPIError(0, 'no email and/or cert token defined')
41-
headers = { "X-Auth-Email": self.EMAIL, "X-Auth-User-Service-Key": self.CERTTOKEN, 'Content-Type': 'application/json' }
41+
headers = { "X-Auth-User-Service-Key": self.CERTTOKEN, 'Content-Type': 'application/json' }
4242
return self._call(method, headers, api_call_part1, api_call_part2, identifier1, identifier2, params, data)
4343

4444
def _call(self, method, headers, api_call_part1, api_call_part2=None, identifier1=None, identifier2=None, params=None, data=None):
@@ -68,9 +68,9 @@ def _call(self, method, headers, api_call_part1, api_call_part2=None, identifier
6868
if method == 'GET':
6969
response = requests.get(url, headers=headers, params=params, data=data)
7070
elif method == 'POST':
71-
response = requests.post(url, headers=headers, json=data)
71+
response = requests.post(url, headers=headers, params=params, json=data)
7272
elif method == 'PUT':
73-
response = requests.put(url, headers=headers, json=data)
73+
response = requests.put(url, headers=headers, params=params, json=data)
7474
elif method == 'DELETE':
7575
if data:
7676
response = requests.delete(url, headers=headers, json=data)

0 commit comments

Comments
 (0)