Skip to content

Commit fbc3fd4

Browse files
committed
Update docs for CreateMixin
Signed-off-by: Roald Nefs <info@roaldnefs.com>
1 parent 2e10b0f commit fbc3fd4

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

docs/user/quickstart.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,20 @@ single :class:`Domain <transip.v6.services.domain.Domain>` object by its name::
114114
<class 'transip.v6.services.domain.DnsEntry'> => {'name': 'www', 'expire': 86400, 'type': 'CNAME', 'content': '@'}
115115
<class 'transip.v6.services.domain.DnsEntry'> => {'name': '_dmarc', 'expire': 86400, 'type': 'TXT', 'content': 'v=DMARC1; p=none;'}
116116

117+
118+
It's also possible to create a new DNS entry for a single
119+
:class:`Domain <transip.v6.services.domain.Domain>`::
120+
121+
>>> domain = client.domains.get('transipdemonstratie.nl')
122+
>>> dns_entry_data = {
123+
... "name": "www",
124+
... "expire": 86400,
125+
... "type": "A",
126+
... "content": "127.0.0.1"
127+
... }
128+
>>> domain.dns.create(dns_entry_data)
129+
130+
117131
Domain Contacts
118132
***************
119133

transip/v6/services/domain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def nameservers(self) -> NameserverService:
102102

103103

104104
class DomainService(CreateMixin, GetMixin, DeleteMixin, ListMixin, ApiService):
105-
"""Service to manage domain."""
105+
"""Service to manage domains."""
106106

107107
_path: str = "/domains"
108108
_obj_cls: Optional[Type[ApiObject]] = Domain

0 commit comments

Comments
 (0)