indradhanush / dnsimple2-python

Python client for the DNSimple v2 API
MIT License
2 stars 5 forks source link

Implement certificates api #14

Closed tizz98 closed 6 years ago

tizz98 commented 7 years ago

Related to issue: https://github.com/indradhanush/dnsimple2-python/issues/10

Usage:

import os
from dnsimple2.client import DNSimple
from dnsimple2 import resources

client = DNSimple(os.getenv('DNSIMPLE_V2_ACCESS_TOKEN'))
account = resources.AccountResource(id=os.getenv('DNSIMPLE_ACCOUNT_ID'))
domain = client.domains.list(account)[0]

for cert in client.certificates.list(account, domain):
    print(cert.name)