1- """ CloudFlare v4 API"""
1+ """ Cloudflare v4 API"""
22
33import json
44import urllib
1414BASE_URL = 'https://api.cloudflare.com/client/v4'
1515
1616class CloudFlare (object ):
17- """ CloudFlare v4 API"""
17+ """ Cloudflare v4 API"""
1818
1919 class _base (object ):
20- """ CloudFlare v4 API"""
20+ """ Cloudflare v4 API"""
2121
2222 def __init__ (self , email , token , certtoken , base_url , debug ):
23- """ CloudFlare v4 API"""
23+ """ Cloudflare v4 API"""
2424
2525 self .email = email
2626 self .token = token
@@ -38,7 +38,7 @@ def call_with_no_auth(self, method,
3838 api_call_part3 = None ,
3939 identifier1 = None , identifier2 = None ,
4040 params = None , data = None ):
41- """ CloudFlare v4 API"""
41+ """ Cloudflare v4 API"""
4242
4343 headers = {
4444 'Content-Type' : 'application/json'
@@ -54,7 +54,7 @@ def call_with_auth(self, method,
5454 api_call_part3 = None ,
5555 identifier1 = None , identifier2 = None ,
5656 params = None , data = None ):
57- """ CloudFlare v4 API"""
57+ """ Cloudflare v4 API"""
5858
5959 if self .email is '' or self .token is '' :
6060 raise CloudFlareAPIError (0 , 'no email and/or token defined' )
@@ -74,7 +74,7 @@ def call_with_certauth(self, method,
7474 api_call_part3 = None ,
7575 identifier1 = None , identifier2 = None ,
7676 params = None , data = None ):
77- """ CloudFlare v4 API"""
77+ """ Cloudflare v4 API"""
7878
7979 if self .certtoken is '' :
8080 raise CloudFlareAPIError (0 , 'no email and/or cert token defined' )
@@ -93,7 +93,7 @@ def _call(self, method, headers,
9393 api_call_part3 = None ,
9494 identifier1 = None , identifier2 = None ,
9595 params = None , data = None ):
96- """ CloudFlare v4 API"""
96+ """ Cloudflare v4 API"""
9797
9898 if api_call_part2 is not None or (data is not None and method == 'GET' ):
9999 if identifier2 is None :
@@ -184,29 +184,29 @@ def _call(self, method, headers,
184184 return result
185185
186186 class add_unused (object ):
187- """ CloudFlare v4 API"""
187+ """ Cloudflare v4 API"""
188188
189189 def __init__ (self , base , api_call_part1 , api_call_part2 = None , api_call_part3 = None ):
190- """ CloudFlare v4 API"""
190+ """ Cloudflare v4 API"""
191191
192192 self .base = base
193193 self .api_call_part1 = api_call_part1
194194 self .api_call_part2 = api_call_part2
195195 self .api_call_part3 = api_call_part3
196196
197197 class add_noauth (object ):
198- """ CloudFlare v4 API"""
198+ """ Cloudflare v4 API"""
199199
200200 def __init__ (self , base , api_call_part1 , api_call_part2 = None , api_call_part3 = None ):
201- """ CloudFlare v4 API"""
201+ """ Cloudflare v4 API"""
202202
203203 self .base = base
204204 self .api_call_part1 = api_call_part1
205205 self .api_call_part2 = api_call_part2
206206 self .api_call_part3 = api_call_part3
207207
208208 def get (self , identifier1 = None , identifier2 = None , params = None , data = None ):
209- """ CloudFlare v4 API"""
209+ """ Cloudflare v4 API"""
210210
211211 return self .base .call_with_no_auth ('GET' ,
212212 self .api_call_part1 ,
@@ -216,18 +216,18 @@ def get(self, identifier1=None, identifier2=None, params=None, data=None):
216216 params , data )
217217
218218 class add_with_auth (object ):
219- """ CloudFlare v4 API"""
219+ """ Cloudflare v4 API"""
220220
221221 def __init__ (self , base , api_call_part1 , api_call_part2 = None , api_call_part3 = None ):
222- """ CloudFlare v4 API"""
222+ """ Cloudflare v4 API"""
223223
224224 self .base = base
225225 self .api_call_part1 = api_call_part1
226226 self .api_call_part2 = api_call_part2
227227 self .api_call_part3 = api_call_part3
228228
229229 def get (self , identifier1 = None , identifier2 = None , params = None , data = None ):
230- """ CloudFlare v4 API"""
230+ """ Cloudflare v4 API"""
231231
232232 return self .base .call_with_auth ('GET' ,
233233 self .api_call_part1 ,
@@ -237,7 +237,7 @@ def get(self, identifier1=None, identifier2=None, params=None, data=None):
237237 params , data )
238238
239239 def patch (self , identifier1 = None , identifier2 = None , params = None , data = None ):
240- """ CloudFlare v4 API"""
240+ """ Cloudflare v4 API"""
241241
242242 return self .base .call_with_auth ('PATCH' ,
243243 self .api_call_part1 ,
@@ -247,7 +247,7 @@ def patch(self, identifier1=None, identifier2=None, params=None, data=None):
247247 params , data )
248248
249249 def post (self , identifier1 = None , identifier2 = None , params = None , data = None ):
250- """ CloudFlare v4 API"""
250+ """ Cloudflare v4 API"""
251251
252252 return self .base .call_with_auth ('POST' ,
253253 self .api_call_part1 ,
@@ -257,7 +257,7 @@ def post(self, identifier1=None, identifier2=None, params=None, data=None):
257257 params , data )
258258
259259 def put (self , identifier1 = None , identifier2 = None , params = None , data = None ):
260- """ CloudFlare v4 API"""
260+ """ Cloudflare v4 API"""
261261
262262 return self .base .call_with_auth ('PUT' ,
263263 self .api_call_part1 ,
@@ -267,7 +267,7 @@ def put(self, identifier1=None, identifier2=None, params=None, data=None):
267267 params , data )
268268
269269 def delete (self , identifier1 = None , identifier2 = None , params = None , data = None ):
270- """ CloudFlare v4 API"""
270+ """ Cloudflare v4 API"""
271271
272272 return self .base .call_with_auth ('DELETE' ,
273273 self .api_call_part1 ,
@@ -277,18 +277,18 @@ def delete(self, identifier1=None, identifier2=None, params=None, data=None):
277277 params , data )
278278
279279 class add_with_cert_auth (object ):
280- """ CloudFlare v4 API"""
280+ """ Cloudflare v4 API"""
281281
282282 def __init__ (self , base , api_call_part1 , api_call_part2 = None , api_call_part3 = None ):
283- """ CloudFlare v4 API"""
283+ """ Cloudflare v4 API"""
284284
285285 self .base = base
286286 self .api_call_part1 = api_call_part1
287287 self .api_call_part2 = api_call_part2
288288 self .api_call_part3 = api_call_part3
289289
290290 def get (self , identifier1 = None , identifier2 = None , params = None , data = None ):
291- """ CloudFlare v4 API"""
291+ """ Cloudflare v4 API"""
292292
293293 return self .base .call_with_certauth ('GET' ,
294294 self .api_call_part1 ,
@@ -298,7 +298,7 @@ def get(self, identifier1=None, identifier2=None, params=None, data=None):
298298 params , data )
299299
300300 def patch (self , identifier1 = None , identifier2 = None , params = None , data = None ):
301- """ CloudFlare v4 API"""
301+ """ Cloudflare v4 API"""
302302
303303 return self .base .call_with_certauth ('PATCH' ,
304304 self .api_call_part1 ,
@@ -308,7 +308,7 @@ def patch(self, identifier1=None, identifier2=None, params=None, data=None):
308308 params , data )
309309
310310 def post (self , identifier1 = None , identifier2 = None , params = None , data = None ):
311- """ CloudFlare v4 API"""
311+ """ Cloudflare v4 API"""
312312
313313 return self .base .call_with_certauth ('POST' ,
314314 self .api_call_part1 ,
@@ -318,7 +318,7 @@ def post(self, identifier1=None, identifier2=None, params=None, data=None):
318318 params , data )
319319
320320 def put (self , identifier1 = None , identifier2 = None , params = None , data = None ):
321- """ CloudFlare v4 API"""
321+ """ Cloudflare v4 API"""
322322
323323 return self .base .call_with_certauth ('PUT' ,
324324 self .api_call_part1 ,
@@ -328,7 +328,7 @@ def put(self, identifier1=None, identifier2=None, params=None, data=None):
328328 params , data )
329329
330330 def delete (self , identifier1 = None , identifier2 = None , params = None , data = None ):
331- """ CloudFlare v4 API"""
331+ """ Cloudflare v4 API"""
332332
333333 return self .base .call_with_certauth ('DELETE' ,
334334 self .api_call_part1 ,
@@ -338,7 +338,7 @@ def delete(self, identifier1=None, identifier2=None, params=None, data=None):
338338 params , data )
339339
340340 def __init__ (self , email = None , token = None , certtoken = None , debug = False ):
341- """ CloudFlare v4 API"""
341+ """ Cloudflare v4 API"""
342342
343343 base_url = BASE_URL
344344
0 commit comments