Skip to content

Commit c7f6759

Browse files
committed
added Cloudflare workers
1 parent 1477dda commit c7f6759

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

CloudFlare/api_v4.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ def api_v4(self):
99
user_load_balancers(self)
1010
user_load_balancing_analytics(self)
1111
user_virtual_dns(self)
12+
user_workers(self)
1213

1314
# The API commands for /zones/
1415
zones(self)
@@ -23,6 +24,7 @@ def api_v4(self):
2324
zones_rate_limits(self)
2425
zones_settings(self)
2526
zones_ssl(self)
27+
zones_workers(self)
2628

2729
# The API commands for /railguns/
2830
railguns(self)
@@ -31,6 +33,7 @@ def api_v4(self):
3133
organizations(self)
3234
organizations_audit_logs(self)
3335
organizations_virtual_dns(self)
36+
organizations_workers(self)
3437

3538
# The API commands for /certificates/
3639
certificates(self)
@@ -409,6 +412,21 @@ def zones_ssl(self):
409412
setattr(branch, "settings",
410413
self._add_with_auth(base, "zones", "ssl/universal/settings"))
411414

415+
def zones_workers(self):
416+
""" API core commands for Cloudflare API"""
417+
418+
base = self._base
419+
branch = self.zones
420+
setattr(branch, "workers",
421+
self._add_unused(base, "zones", "workers"))
422+
branch = self.zones.workers
423+
setattr(branch, "filters",
424+
self._add_with_auth(base, "zones", "workers/filters"))
425+
setattr(branch, "routes",
426+
self._add_with_auth(base, "zones", "workers/routes"))
427+
setattr(branch, "scripts",
428+
self._add_with_auth(base, "zones", "workers/scripts"))
429+
412430
def zones_load_balancers(self):
413431
""" API core commands for Cloudflare API"""
414432

@@ -447,6 +465,17 @@ def user_virtual_dns(self):
447465
setattr(branch, "bytime",
448466
self._add_with_auth(base, "user/virtual_dns", "dns_analytics/report/bytime"))
449467

468+
def user_workers(self):
469+
""" API core commands for Cloudflare API"""
470+
471+
base = self._base
472+
branch = self.user
473+
setattr(branch, "workers",
474+
self._add_unused(base, "user/workers"))
475+
branch = self.user.workers
476+
setattr(branch, "scripts",
477+
self._add_with_auth(base, "user/workers/scripts"))
478+
450479
def organizations_virtual_dns(self):
451480
""" API core commands for Cloudflare API"""
452481

@@ -493,6 +522,17 @@ def organizations_audit_logs(self):
493522
setattr(branch, "audit_logs",
494523
self._add_with_auth(base, "organizations", "audit_logs"))
495524

525+
def organizations_workers(self):
526+
""" API core commands for Cloudflare API"""
527+
528+
base = self._base
529+
branch = self.organizations
530+
setattr(branch, "workers",
531+
self._add_unused(base, "organizations", "workers"))
532+
branch = self.organizations.workers
533+
setattr(branch, "scripts",
534+
self._add_with_auth(base, "organizations", "workers/scripts"))
535+
496536
def account(self):
497537
""" API core commands for Cloudflare API"""
498538

0 commit comments

Comments
 (0)