123456789101112131415161718192021222324 |
- import ovh
- # domain-zone-star-test
- client = ovh.Client(
- endpoint='ovh-eu',
- application_key='todo',
- application_secret='todo',
- consumer_key='todo',
- )
- # Print nice welcome message
- #print("Welcome", client.get('/me')['firstname'])
- #print("My records", client.get('/domain/zone/norwood.bzh/record/5353546247')['target'])
- # Create a record
- params = {}
- params['fieldType'] = 'TXT'
- params['subDomain'] = 'hello'
- params['target'] = 'from python'
- params['ttl'] = 600
- print('Creating record ...')
- ans = client.post('/domain/zone/norwood.bzh/record', **params)
- print('Record created : ', ans)
|