@@ -5,18 +5,20 @@ def api_v4(self):
55
66 # The API commands for /user/
77 user (self )
8+ user_load_balancers (self )
9+ user_virtual_dns (self )
810 # The API commands for /zones/
911 zones (self )
1012 zones_settings (self )
1113 zones_analytics (self )
1214 zones_firewall (self )
1315 zones_rate_limits (self )
14- zones_dns_analytics (self )
1516 zones_amp (self )
1617 # The API commands for /railguns/
1718 railguns (self )
1819 # The API commands for /organizations/
1920 organizations (self )
21+ organizations_virtual_dns (self )
2022 # The API commands for /certificates/
2123 certificates (self )
2224 # The API commands for /ips/
@@ -29,44 +31,43 @@ def api_v4(self):
2931 zones_ssl (self )
3032 # The API commands for CLB /zones/:zone_id/load_balancers & /user/load_balancers
3133 zones_load_balancers (self )
32- user_load_balancers (self )
34+ zones_dns_analytics (self )
3335
3436def user (self ):
3537 """ API core commands for Cloudflare API"""
3638
3739 base = self ._base
3840 setattr (self , "user" ,
3941 self ._add_with_auth (base , "user" ))
40- branch = getattr ( self , " user" )
42+ branch = self . user
4143 setattr (branch , "billing" ,
4244 self ._add_unused (base , "user/billing" ))
43- branch = getattr ( getattr ( self , " user" ), " billing" )
45+ branch = self . user . billing
4446 setattr (branch , "history" ,
4547 self ._add_with_auth (base , "user/billing/history" ))
4648 setattr (branch , "profile" ,
4749 self ._add_with_auth (base , "user/billing/profile" ))
4850 setattr (branch , "subscriptions" ,
4951 self ._add_unused (base , "user/billing/subscriptions" ))
50- branch = getattr ( getattr ( getattr ( self , " user" ), " billing" ), " subscriptions" )
52+ branch = self . user . billing . subscriptions
5153 setattr (branch , "apps" ,
5254 self ._add_with_auth (base , "user/billing/subscriptions/apps" ))
5355 setattr (branch , "zones" ,
5456 self ._add_with_auth (base , "user/billing/subscriptions/zones" ))
55- setattr (getattr (self , "user" ), "firewall" ,
57+ branch = self .user
58+ setattr (branch , "firewall" ,
5659 self ._add_unused (base , "user/firewall" ))
57- branch = getattr ( getattr ( self , " user" ), " firewall" )
60+ branch = self . user . firewall
5861 setattr (branch , "access_rules" ,
5962 self ._add_unused (base , "user/firewall/access_rules" ))
60- branch = getattr ( getattr ( getattr ( self , " user" ), " firewall" ), " access_rules" )
63+ branch = self . user . firewall . access_rules
6164 setattr (branch , "rules" ,
6265 self ._add_with_auth (base , "user/firewall/access_rules/rules" ))
63- branch = getattr ( self , " user" )
66+ branch = self . user
6467 setattr (branch , "organizations" ,
6568 self ._add_with_auth (base , "user/organizations" ))
6669 setattr (branch , "invites" ,
6770 self ._add_with_auth (base , "user/invites" ))
68- setattr (branch , "virtual_dns" ,
69- self ._add_with_auth (base , "user/virtual_dns" ))
7071 setattr (branch , "subscriptions" ,
7172 self ._add_with_auth (base , "user/subscriptions" ))
7273
@@ -76,7 +77,7 @@ def zones(self):
7677 base = self ._base
7778 setattr (self , "zones" ,
7879 self ._add_with_auth (base , "zones" ))
79- branch = getattr ( self , " zones" )
80+ branch = self . zones
8081 setattr (branch , "activation_check" ,
8182 self ._add_with_auth (base , "zones" , "activation_check" ))
8283 setattr (branch , "available_plans" ,
@@ -85,10 +86,10 @@ def zones(self):
8586 self ._add_with_auth (base , "zones" , "available_rate_plans" ))
8687 setattr (branch , "custom_certificates" ,
8788 self ._add_with_auth (base , "zones" , "custom_certificates" ))
88- branch = getattr ( getattr ( self , " zones" ), " custom_certificates" )
89+ branch = self . zones . custom_certificates
8990 setattr (branch , "prioritize" ,
9091 self ._add_with_auth (base , "zones" , "custom_certificates/prioritize" ))
91- branch = getattr ( self , " zones" )
92+ branch = self . zones
9293 setattr (branch , "custom_pages" ,
9394 self ._add_with_auth (base , "zones" , "custom_pages" ))
9495 setattr (branch , "dns_records" ,
@@ -101,32 +102,37 @@ def zones(self):
101102 self ._add_with_auth (base , "zones" , "purge_cache" ))
102103 setattr (branch , "railguns" ,
103104 self ._add_with_auth (base , "zones" , "railguns" ))
104- branch = getattr ( getattr ( self , " zones" ), " railguns" )
105+ branch = self . zones . railguns
105106 setattr (branch , "diagnose" ,
106107 self ._add_with_auth (base , "zones" , "railguns" , "diagnose" ))
107- branch = getattr ( self , " zones" )
108+ branch = self . zones
108109 setattr (branch , "subscription" ,
109110 self ._add_with_auth (base , "zones" , "subscription" ))
110111 setattr (branch , "subscriptions" ,
111112 self ._add_with_auth (base , "zones" , "subscriptions" ))
112- branch = getattr ( getattr ( self , " zones" ), " dns_records" )
113+ branch = self . zones . dns_records
113114 setattr (branch , "export" ,
114115 self ._add_with_auth (base , "zones" , "dns_records/export" ))
115116 setattr (branch , "import" ,
116117 self ._add_with_auth (base , "zones" , "dns_records/import" ))
118+ branch = self .zones
119+ setattr (branch , "custom_hostnames" ,
120+ self ._add_with_auth (base , "zones" , "custom_hostnames" ))
117121
118122def zones_settings (self ):
119123 """ API core commands for Cloudflare API"""
120124
121125 base = self ._base
122- branch = getattr ( self , " zones" )
126+ branch = self . zones
123127 setattr (branch , "settings" ,
124128 self ._add_with_auth (base , "zones" , "settings" ))
125- branch = getattr ( getattr ( self , " zones" ), " settings" )
129+ branch = self . zones . settings
126130 setattr (branch , "advanced_ddos" ,
127131 self ._add_with_auth (base , "zones" , "settings/advanced_ddos" ))
128132 setattr (branch , "always_online" ,
129133 self ._add_with_auth (base , "zones" , "settings/always_online" ))
134+ setattr (branch , "always_use_https" ,
135+ self ._add_with_auth (base , "zones" , "settings/always_use_https" ))
130136 setattr (branch , "browser_cache_ttl" ,
131137 self ._add_with_auth (base , "zones" , "settings/browser_cache_ttl" ))
132138 setattr (branch , "browser_check" ,
@@ -187,6 +193,8 @@ def zones_settings(self):
187193 self ._add_with_auth (base , "zones" , "settings/websockets" ))
188194 setattr (branch , "waf" ,
189195 self ._add_with_auth (base , "zones" , "settings/waf" ))
196+ setattr (branch , "webp" ,
197+ self ._add_with_auth (base , "zones" , "settings/webp" ))
190198 setattr (branch , "http2" ,
191199 self ._add_with_auth (base , "zones" , "settings/http2" ))
192200 setattr (branch , "pseudo_ipv4" ,
@@ -200,10 +208,10 @@ def zones_analytics(self):
200208 """ API core commands for Cloudflare API"""
201209
202210 base = self ._base
203- branch = getattr ( self , " zones" )
211+ branch = self . zones
204212 setattr (branch , "analytics" ,
205213 self ._add_unused (base , "zones" , "analytics" ))
206- branch = getattr ( getattr ( self , " zones" ), " analytics" )
214+ branch = self . zones . analytics
207215 setattr (branch , "colos" ,
208216 self ._add_with_auth (base , "zones" , "analytics/colos" ))
209217 setattr (branch , "dashboard" ,
@@ -213,56 +221,61 @@ def zones_firewall(self):
213221 """ API core commands for Cloudflare API"""
214222
215223 base = self ._base
216- branch = getattr ( self , " zones" )
224+ branch = self . zones
217225 setattr (branch , "firewall" ,
218226 self ._add_unused (branch , "zones" , "firewall" ))
219- branch = getattr ( getattr ( self , " zones" ), " firewall" )
227+ branch = self . zones . firewall
220228 setattr (branch , "access_rules" ,
221229 self ._add_unused (base , "zones" , "firewall/access_rules" ))
222230 setattr (branch , "waf" ,
223231 self ._add_unused (base , "zones" , "firewall/waf" ))
224- branch = getattr ( getattr ( getattr ( self , " zones" ), " firewall" ), " waf" )
232+ branch = self . zones . firewall . waf
225233 setattr (branch , "packages" ,
226234 self ._add_with_auth (base , "zones" , "firewall/waf/packages" ))
227- branch = getattr ( getattr ( getattr ( getattr ( self , " zones" ), " firewall" ), " waf" ), " packages" )
235+ branch = self . zones . firewall . waf . packages
228236 setattr (branch , "groups" ,
229237 self ._add_with_auth (base , "zones" , "firewall/waf/packages" , "groups" ))
230238 setattr (branch , "rules" ,
231239 self ._add_with_auth (base , "zones" , "firewall/waf/packages" , "rules" ))
232- branch = getattr ( getattr ( getattr ( self , " zones" ), " firewall" ), " access_rules" )
240+ branch = self . zones . firewall . access_rules
233241 setattr (branch , "rules" ,
234242 self ._add_with_auth (base , "zones" , "firewall/access_rules/rules" ))
243+ branch = self .zones .firewall
244+ setattr (branch , "lockdowns" ,
245+ self ._add_with_auth (base , "zones" , "firewall/lockdowns" ))
246+ setattr (branch , "ua_rules" ,
247+ self ._add_with_auth (base , "zones" , "firewall/ua_rules" ))
235248
236249def zones_rate_limits (self ):
237250 """ API core commands for Cloudflare API"""
238251
239252 base = self ._base
240- branch = getattr ( self , " zones" )
253+ branch = self . zones
241254 setattr (branch , "rate_limits" ,
242255 self ._add_with_auth (base , "zones" , "rate_limits" ))
243256
244257def zones_dns_analytics (self ):
245258 """ API core commands for Cloudflare API"""
246259
247260 base = self ._base
248- branch = getattr ( self , " zones" )
261+ branch = self . zones
249262 setattr (branch , "dns_analytics" ,
250263 self ._add_unused (base , "zones" , "dns_analytics" ))
251- branch = getattr ( getattr ( self , " zones" ), " dns_analytics" )
264+ branch = self . zones . dns_analytics
252265 setattr (branch , "report" ,
253266 self ._add_with_auth (base , "zones" , "dns_analytics/report" ))
254- branch = getattr ( getattr ( getattr ( self , " zones" ), " dns_analytics" ), " report" )
267+ branch = self . zones . dns_analytics . report
255268 setattr (branch , "bytime" ,
256269 self ._add_with_auth (base , "zones" , "dns_analytics/report/bytime" ))
257270
258271def zones_amp (self ):
259272 """ API core commands for Cloudflare API"""
260273
261274 base = self ._base
262- branch = getattr ( self , " zones" )
275+ branch = self . zones
263276 setattr (branch , "amp" ,
264277 self ._add_unused (base , "zones" , "amp" ))
265- branch = getattr ( getattr ( self , " zones" ), " amp" )
278+ branch = self . zones . amp
266279 setattr (branch , "viewer" ,
267280 self ._add_with_auth (base , "zones" , "amp/viewer" ))
268281
@@ -272,7 +285,7 @@ def railguns(self):
272285 base = self ._base
273286 setattr (self , "railguns" ,
274287 self ._add_with_auth (base , "railguns" ))
275- branch = getattr ( self , " railguns" )
288+ branch = self . railguns
276289 setattr (branch , "zones" ,
277290 self ._add_with_auth (base , "railguns" , "zones" ))
278291
@@ -282,7 +295,7 @@ def organizations(self):
282295 base = self ._base
283296 setattr (self , "organizations" ,
284297 self ._add_with_auth (base , "organizations" ))
285- branch = getattr ( self , " organizations" )
298+ branch = self . organizations
286299 setattr (branch , "members" ,
287300 self ._add_with_auth (base , "organizations" , "members" ))
288301 setattr (branch , "invite" ,
@@ -291,26 +304,24 @@ def organizations(self):
291304 self ._add_with_auth (base , "organizations" , "invites" ))
292305 setattr (branch , "railguns" ,
293306 self ._add_with_auth (base , "organizations" , "railguns" ))
294- branch = getattr ( getattr ( self , " organizations" ), " railguns" )
307+ branch = self . organizations . railguns
295308 setattr (branch , "zones" ,
296309 self ._add_with_auth (base , "organizations" , "railguns" , "zones" ))
297- branch = getattr ( self , " organizations" )
310+ branch = self . organizations
298311 setattr (branch , "roles" ,
299312 self ._add_with_auth (base , "organizations" , "roles" ))
300313 setattr (branch , "firewall" ,
301314 self ._add_unused (base , "organizations" , "firewall" ))
302- branch = getattr ( getattr ( self , " organizations" ), " firewall" )
315+ branch = self . organizations . firewall
303316 setattr (branch , "access_rules" ,
304317 self ._add_unused (base , "organizations" , "firewall/access_rules" ))
305- branch = getattr ( getattr ( getattr ( self , " organizations" ), " firewall" ), " access_rules" )
318+ branch = self . organizations . firewall . access_rules
306319 setattr (branch , "rules" ,
307320 self ._add_with_auth (base , "organizations" , "firewall/access_rules/rules" ))
308- branch = getattr (self , "organizations" )
309- setattr (branch , "virtual_dns" ,
310- self ._add_with_auth (base , "organizations" , "virtual_dns" ))
321+ branch = self .organizations
311322 setattr (branch , "load_balancers" ,
312323 self ._add_with_auth (base , "organizations" , "load_balancers" ))
313- branch = getattr ( getattr ( self , " organizations" ), " load_balancers" )
324+ branch = self . organizations . load_balancers
314325 setattr (branch , "monitors" ,
315326 self ._add_with_auth (base , "organizations" , "load_balancers/monitors" ))
316327 setattr (branch , "pools" ,
@@ -334,10 +345,10 @@ def zones_argo(self):
334345 """ API core commands for Cloudflare API"""
335346
336347 base = self ._base
337- branch = getattr ( self , " zones" )
348+ branch = self . zones
338349 setattr (branch , "argo" ,
339350 self ._add_unused (base , "zones" , "argo" ))
340- branch = getattr ( getattr ( self , " zones" ), " argo" )
351+ branch = self . zones . argo
341352 setattr (branch , "tiered_caching" ,
342353 self ._add_with_auth (base , "zones" , "argo/tiered_caching" ))
343354 setattr (branch , "smart_routing" ,
@@ -347,18 +358,18 @@ def zones_dnssec(self):
347358 """ API core commands for Cloudflare API"""
348359
349360 base = self ._base
350- branch = getattr ( self , " zones" )
361+ branch = self . zones
351362 setattr (branch , "dnssec" ,
352363 self ._add_with_auth (base , "zones" , "dnssec" ))
353364
354365def zones_ssl (self ):
355366 """ API core commands for Cloudflare API"""
356367
357368 base = self ._base
358- branch = getattr ( self , " zones" )
369+ branch = self . zones
359370 setattr (branch , "ssl" ,
360371 self ._add_unused (base , "zones" , "ssl" ))
361- branch = getattr ( getattr ( self , " zones" ), " ssl" )
372+ branch = self . zones . ssl
362373 setattr (branch , "analyze" ,
363374 self ._add_with_auth (base , "zones" , "ssl/analyze" ))
364375 setattr (branch , "certificate_packs" ,
@@ -370,21 +381,54 @@ def zones_load_balancers(self):
370381 """ API core commands for Cloudflare API"""
371382
372383 base = self ._base
373- branch = getattr ( self , " zones" )
384+ branch = self . zones
374385 setattr (branch , "load_balancers" ,
375386 self ._add_with_auth (base , "zones" , "load_balancers" ))
376387
377388def user_load_balancers (self ):
378389 """ API core commands for Cloudflare API"""
379390
380391 base = self ._base
381- branch = getattr ( self , " user" )
392+ branch = self . user
382393 setattr (branch , "load_balancers" ,
383394 self ._add_unused (base , "user/load_balancers" ))
384- branch = getattr ( getattr ( self , " user" ), " load_balancers" )
395+ branch = self . user . load_balancers
385396 setattr (branch , "monitors" ,
386397 self ._add_with_auth (base , "user/load_balancers/monitors" ))
387398 setattr (branch , "pools" ,
388399 self ._add_with_auth (base , "user/load_balancers/pools" ))
389- branch = getattr (getattr (getattr (self , "user" ), "load_balancers" ), "pools" )
400+
401+ def user_virtual_dns (self ):
402+ """ API core commands for Cloudflare API"""
403+
404+ base = self ._base
405+ branch = self .user
406+ setattr (branch , "virtual_dns" ,
407+ self ._add_with_auth (base , "user/virtual_dns" ))
408+ branch = self .user .virtual_dns
409+ setattr (branch , "dns_analytics" ,
410+ self ._add_unused (base , "user/virtual_dns" , "dns_analytics" ))
411+ branch = self .user .virtual_dns .dns_analytics
412+ setattr (branch , "report" ,
413+ self ._add_with_auth (base , "user/virtual_dns" , "dns_analytics/report" ))
414+ branch = self .user .virtual_dns .dns_analytics .report
415+ setattr (branch , "bytime" ,
416+ self ._add_with_auth (base , "user/virtual_dns" , "dns_analytics/report/bytime" ))
417+
418+ def organizations_virtual_dns (self ):
419+ """ API core commands for Cloudflare API"""
420+
421+ base = self ._base
422+ branch = self .organizations
423+ setattr (branch , "virtual_dns" ,
424+ self ._add_with_auth (base , "organizations" , "virtual_dns" ))
425+ branch = self .organizations .virtual_dns
426+ setattr (branch , "dns_analytics" ,
427+ self ._add_unused (base , "organizations" , "virtual_dns" , "dns_analytics" ))
428+ branch = self .organizations .virtual_dns .dns_analytics
429+ setattr (branch , "report" ,
430+ self ._add_with_auth (base , "organizations" , "virtual_dns" , "dns_analytics/report" ))
431+ branch = self .organizations .virtual_dns .dns_analytics .report
432+ setattr (branch , "bytime" ,
433+ self ._add_with_auth (base , "organizations" , "virtual_dns" , "dns_analytics/report/bytime" ))
390434
0 commit comments