From 890bb1052f22d46307c7ca823c95e56d2ed46ee5 Mon Sep 17 00:00:00 2001 From: Isaac Date: Mon, 8 Jan 2018 18:22:45 -0800 Subject: [PATCH] changed create route value to be a null route of 8.8.8.8 --- demo.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/demo.py b/demo.py index b973358..4376084 100755 --- a/demo.py +++ b/demo.py @@ -9,8 +9,11 @@ from flowroutenumbersandmessaging.models.new_route import NewRoute print("Number/Route Management v2 & Messaging v2.1 Demo") # Set up your api credentials -basic_auth_user_name = os.environ.get('FR_ACCESS_KEY') -basic_auth_password = os.environ.get('FR_SECRET_KEY') +#basic_auth_user_name = os.environ.get('FR_ACCESS_KEY') +#basic_auth_password = os.environ.get('FR_SECRET_KEY') +basic_auth_user_name = '49970057' +basic_auth_password = 'HGRVeyKnk9jMtpFGLjM53AVl0xWwi4u8' + # Instantiate API client and create controllers for Numbers, Messages, and Routes client = FlowroutenumbersandmessagingClient(basic_auth_user_name, basic_auth_password) @@ -65,18 +68,20 @@ pprint.pprint(result) print ("---Create an Inbound Route") +host_address = '8.8.8.8' request_body = '{ \ "data": { \ "type": "route", \ "attributes": { \ "route_type": "host", \ - "value": "' + str(number_id) +'", \ + "value": "' + str(host_address) +'", \ "alias": "new_route_id" \ } \ } \ }' result = routes_controller.create_an_inbound_route(request_body) +print result pprint.pprint(result) print ("---List Inbound Routes")