def main(): api_url, username, password = get_account_data(True) inwx_conn = domrobot(api_url, username, password, 'en', False) print prettyprint.contacts(inwx_conn.contact.list()['contact']) print prettyprint.nameserversets(inwx_conn.nameserverset.list()['nsset']) print "\nRegister a new domain\n" domainname = raw_input('New Domain [e.g. example.com]: ') check = inwx_conn.domain.check({'domain': domainname}) if check['domain'][0]['status'] == 'free': if raw_input( "The domain %s is available. Do you want to register now? [yes/no]: " % domainname) != 'yes': return registrant_id = int( raw_input( 'Please give the ID for the registrant and admin contact [e.g. 1023532]: ' )) admin_id = registrant_id tech_id, billing_id = 1, 1 nameservers = ['ns.inwx.de', 'ns2.inwx.de', 'ns3.inwx.de'] reg_result = inwx_conn.domain.create({ 'domain': domainname, 'registrant': registrant_id, 'admin': admin_id, 'tech': tech_id, 'billing': billing_id, 'ns': nameservers }) if reg_result == None: print "Successfully registered the domain." else: print "Sorry, the domain %s is not available anymore." % domainname print "The current status of the domain is '%s'." % check['domain'][0][ 'status']
def main(): api_url, username, password = get_account_data(True) inwx_conn = domrobot(api_url, username, password, 'en', False) print prettyprint.contacts(inwx_conn.contact.list()['contact']) print "\nCreate a new contact\n" type = raw_input('Type [PERSON, ORG or ROLE]: ') name = raw_input('Prename and Surname: ') street, city, postal_code, country_code = raw_input('Street: '), raw_input('City: '), raw_input('Postal Code [60438]: '), raw_input('Country Code [de]: ') phone, email = raw_input('Phone [+49.123123123]: '), raw_input('E-Mail: ') print inwx_conn.contact.create({'type': type, 'name': name, 'street': street, 'city': city, 'pc': postal_code, 'cc': country_code, 'voice': phone, 'email': email})
def main(): api_url, username, password = get_account_data(True) inwx_conn = domrobot(api_url, username, password, 'en', False) print prettyprint.contacts(inwx_conn.contact.list()['contact']) print prettyprint.nameserversets(inwx_conn.nameserverset.list()['nsset']) print "\nRegister a new domain\n" domainname = raw_input('New Domain [e.g. example.com]: ') check = inwx_conn.domain.check({'domain': domainname}) if check['domain'][0]['status'] == 'free': if raw_input("The domain %s is available. Do you want to register now? [yes/no]: " % domainname) != 'yes': return registrant_id = int(raw_input('Please give the ID for the registrant and admin contact [e.g. 1023532]: ')) admin_id = registrant_id tech_id, billing_id = 1,1 nameservers = ['ns.inwx.de','ns2.inwx.de','ns3.inwx.de'] reg_result = inwx_conn.domain.create({'domain':domainname, 'registrant': registrant_id, 'admin': admin_id, 'tech': tech_id, 'billing': billing_id, 'ns': nameservers}) if reg_result == None: print "Successfully registered the domain." else: print "Sorry, the domain %s is not available anymore." % domainname print "The current status of the domain is '%s'." % check['domain'][0]['status']
def main(): api_url, username, password = get_account_data(True) inwx_conn = domrobot(api_url, username, password, 'en', False) print prettyprint.contacts(inwx_conn.contact.list()['contact']) print "\nCreate a new contact\n" type = raw_input('Type [PERSON, ORG or ROLE]: ') name = raw_input('Prename and Surname: ') street, city, postal_code, country_code = raw_input('Street: '), raw_input( 'City: '), raw_input('Postal Code [60438]: '), raw_input( 'Country Code [de]: ') phone, email = raw_input('Phone [+49.123123123]: '), raw_input('E-Mail: ') print inwx_conn.contact.create({ 'type': type, 'name': name, 'street': street, 'city': city, 'pc': postal_code, 'cc': country_code, 'voice': phone, 'email': email })