Skip to content

Commit

Permalink
typo in cloudflare.py
Browse files Browse the repository at this point in the history
fixed ability to add email-fwdr

here's my code if anyone wants to add an email request validation:

```python
    cf = CloudFlare(email=CLOUDFLARE_EMAIL, token=CLOUDFLARE_TOKEN)
    cf.add('VOID', "accounts", "email-fwdr")
    cf.add('AUTH', "accounts", "email-fwdr", "addresses")
    data = json.dumps({"email": email})
    cf.accounts.email_fwdr.addresses.post(CLOUDFLARE_ACCOUNT, data=data)
```
  • Loading branch information
phntom authored Mar 2, 2022
1 parent 4c80399 commit dd6d802
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CloudFlare/cloudflare.py
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ def add(self, t, p1, p2=None, p3=None):
for element in a[0:-1]:
try:
if '-' in element:
branch = getattr(element, element.replace('-','_'))
branch = getattr(branch, element.replace('-','_'))
else:
branch = getattr(branch, element)
except:
Expand Down

0 comments on commit dd6d802

Please sign in to comment.