diff options
| author | 2021-07-19 16:06:04 +0100 | |
|---|---|---|
| committer | 2021-07-19 16:06:04 +0100 | |
| commit | c2139527c79f2bd4ab7c1e8819e1270252d3616a (patch) | |
| tree | 03d4156b78b40dbcef7f4047ad9efbab03e36784 /arthur/apis/cloudflare/zones.py | |
| parent | Fix linting issues (diff) | |
Fix linting again
Diffstat (limited to 'arthur/apis/cloudflare/zones.py')
| -rw-r--r-- | arthur/apis/cloudflare/zones.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arthur/apis/cloudflare/zones.py b/arthur/apis/cloudflare/zones.py index a5a81d8..9098d99 100644 --- a/arthur/apis/cloudflare/zones.py +++ b/arthur/apis/cloudflare/zones.py @@ -1,15 +1,15 @@ +"""APIs for managing Cloudflare zones.""" from typing import Optional import aiohttp from arthur.config import CONFIG - CF_TOKEN = CONFIG.cloudflare_token async def list_zones(zone_name: Optional[str] = None) -> dict[str, str]: - + """List all Cloudflare zones.""" endpoint = "https://api.cloudflare.com/client/v4/zones" request_headers = {"X-Auth-User-Service-Key": CF_TOKEN} @@ -26,7 +26,7 @@ async def list_zones(zone_name: Optional[str] = None) -> dict[str, str]: async def purge_zone(zone_identifier: str) -> dict: - + """Purge the cache for a Cloudflare zone.""" endpoint = f"https://api.cloudflare.com/client/v4/zones/{zone_identifier}/purge_cache?purge_everything=true" # noqa: E501 request_headers = {"X-Auth-User-Service-Key": CF_TOKEN} |