Skip to content

Commit

Permalink
added /zones/amp & /zones/dns_analytics API calls
Browse files Browse the repository at this point in the history
  • Loading branch information
mahtin committed Aug 27, 2017
1 parent a56ab78 commit 510a4b6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
Binary file added CloudFlare/.api_v4.py.swp
Binary file not shown.
27 changes: 27 additions & 0 deletions CloudFlare/api_v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ def api_v4(self):
zones_analytics(self)
zones_firewall(self)
zones_rate_limits(self)
zones_dns_analytics(self)
zones_amp(self)
# The API commands for /railguns/
railguns(self)
# The API commands for /organizations/
Expand Down Expand Up @@ -239,6 +241,31 @@ def zones_rate_limits(self):
setattr(branch, "rate_limits",
self._add_with_auth(base, "zones", "rate_limits"))

def zones_dns_analytics(self):
""" API core commands for Cloudflare API"""

base = self._base
branch = getattr(self, "zones")
setattr(branch, "dns_analytics",
self._add_unused(base, "zones", "dns_analytics"))
branch = getattr(getattr(self, "zones"), "dns_analytics")
setattr(branch, "report",
self._add_with_auth(base, "zones", "dns_analytics/report"))
branch = getattr(getattr(getattr(self, "zones"), "dns_analytics"), "report")
setattr(branch, "bytime",
self._add_with_auth(base, "zones", "dns_analytics/report/bytime"))

def zones_amp(self):
""" API core commands for Cloudflare API"""

base = self._base
branch = getattr(self, "zones")
setattr(branch, "amp",
self._add_unused(base, "zones", "amp"))
branch = getattr(getattr(self, "zones"), "amp")
setattr(branch, "viewer",
self._add_with_auth(base, "zones", "amp/viewer"))

def railguns(self):
""" API core commands for Cloudflare API"""

Expand Down

0 comments on commit 510a4b6

Please sign in to comment.