예제 #1
0
def vultr_api_call(unit, command, method, data=None):
    url = VULTR_URL % (unit, command, VULTR_TOKEN)
    result, response = make_request(url, VULTR_HEADERS, method, data)
    if result:
        return (True, response) if validate_response_code(response, method) else (False, None)
    else:
        return False, None