Skip to content

Commit

Permalink
needed to handle files= paramater for all POST calls
Browse files Browse the repository at this point in the history
  • Loading branch information
mahtin committed Sep 27, 2017
1 parent 593b06b commit 3731c06
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions CloudFlare/cloudflare.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def call_with_no_auth(self, method,
api_call_part2=None,
api_call_part3=None,
identifier1=None, identifier2=None, identifier3=None,
params=None, data=None):
params=None, data=None, files=None):
""" Cloudflare v4 API"""

headers = {
Expand All @@ -49,7 +49,7 @@ def call_with_no_auth(self, method,
return self._call(method, headers,
api_call_part1, api_call_part2, api_call_part3,
identifier1, identifier2, identifier3,
params, data)
params, data, files)

def call_with_auth(self, method,
api_call_part1,
Expand Down Expand Up @@ -82,7 +82,7 @@ def call_with_certauth(self, method,
api_call_part2=None,
api_call_part3=None,
identifier1=None, identifier2=None, identifier3=None,
params=None, data=None):
params=None, data=None, files=None):
""" Cloudflare v4 API"""

if self.certtoken is '' or self.certtoken is None:
Expand All @@ -95,7 +95,7 @@ def call_with_certauth(self, method,
return self._call(method, headers,
api_call_part1, api_call_part2, api_call_part3,
identifier1, identifier2, identifier3,
params, data)
params, data, files)

def _raw(self, method, headers,
api_call_part1, api_call_part2=None, api_call_part3=None,
Expand Down Expand Up @@ -518,15 +518,15 @@ def patch(self, identifier1=None, identifier2=None, identifier3=None, params=Non
identifier1, identifier2, identifier3,
params, data)

def post(self, identifier1=None, identifier2=None, identifier3=None, params=None, data=None):
def post(self, identifier1=None, identifier2=None, identifier3=None, params=None, data=None, files=None):
""" Cloudflare v4 API"""

return self._base.call_with_certauth('POST',
self.api_call_part1,
self.api_call_part2,
self.api_call_part3,
identifier1, identifier2, identifier3,
params, data)
params, data, files)

def put(self, identifier1=None, identifier2=None, identifier3=None, params=None, data=None):
""" Cloudflare v4 API"""
Expand Down

0 comments on commit 3731c06

Please sign in to comment.