Created
          October 19, 2015 12:13 
        
      - 
      
- 
        Save nferrari/1a61ff19f0ed18eb49ca to your computer and use it in GitHub Desktop. 
    Create domain record on alwaysdata API
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python | |
| import json | |
| import requests | |
| address = 'https://api.alwaysdata.com/v1/domain/record/' | |
| credentials = ('APIKEY account=foobar', '') | |
| data = { | |
| 'name': '', | |
| 'domain': 1234, | |
| 'type': 'A', | |
| 'value': '1.2.3.4', | |
| } | |
| response = requests.post( | |
| address, | |
| auth=credentials, | |
| data=json.dumps(data), | |
| ) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment