def getToken(): appSettings = readSettings.loadSettings("../../settings.txt") firstSetting = appSettings[0].rstrip() return firstSetting
def getRoomId(): appSettings = readSettings.loadSettings("settings.txt") roomID = appSettings[0].rstrip() return roomID
# incurred with their use. # # INFORMATION: # If you have further questions about this API and script, please contact GVE. Here are the contact details: # For internal Cisco [email protected] # For Cisco partners, open a case at www.cisco.com/go/ph import sys from WrapperAPI import Wrapper_API import requests import json import re import readSettings # Requires settings file containing FMC server, username, password and Umbrella API token setList = readSettings.loadSettings("../settings.txt") server = setList[0].rstrip() username = setList[1].rstrip() password = setList[2].rstrip() token = setList[3].rstrip() # Initialise the API class ourRequest = Wrapper_API(server, username, password) # Get an access token from the FMC API using the username and password provided print "Authenticating..." ourRequest.authentication() print "Successful" # Regex pattern to check user input for correct domain formatting
def getToken(): appSettings = readSettings.loadSettings("settings.txt") bot = appSettings[2].rstrip() return bot