(email, key, domain, logger, setting, value)
Get the ZoneID for the specified domain
Get the ZoneID for the specified domain
Get the ZoneID for the specified domain
def change_zone_settings(email, key, domain, logger, setting, value):
    ''' Get the ZoneID for the specified domain '''
    headers = {
        'X-Auth-Email' : email,
        'X-Auth-Key' : key,
        'Content-Type' : 'application/json'
    }
    zoneid = get_zoneid(email, key, domain, logger)
    url = "%s/zones/%s/settings/%s" % (baseurl,
                                       zoneid, setting)
    payload = json.dumps(value)
    logger.debug("cloudflare: Requesting url " + url)
    try:
        req = requests.patch(url=url, headers=headers, data=payload)
        if validate_response(req, logger):
            return True
        else:
            return False
    except:
        return False
def change_zone_settings ( email , key , domain , logger , setting , value ) : headers = { 'X-Auth-Email' : email , 'X-Auth-Key' : key , 'Content-Type' : 'application/json' } zoneid = get_zoneid ( email , key , domain , logger ) url = "%s/zones/%s/settings/%s" % ( baseurl , zoneid , setting ) payload = json . dumps ( value ) logger . debug ( "cloudflare: Requesting url " + url ) try : req = requests . patch ( url = url , headers = headers , data = payload ) if validate_response ( req , logger ) : return True else : return False except : return False