# Here we are swapping the date format from DD/MM/YYYY to MM/DD/YYYY start_time = list(start_time) start_time[0:2], start_time[3:5] = start_time[3:5], start_time[ 0:2] start_time = ''.join(start_time) start_time = start_time + ":00" if session_type is 'M': try: response = functions.CreateMeeting( functions.sessionSecurityContext, meetingPassword=credentials.meeting_password, confName=meeting_name, meetingType=meetingType, agenda=period_name, startDate=start_time, duration=duration, host=host, attendees=attendees) print( 'Meeting Key:', response.find( '{*}body/{*}bodyContent/{*}meetingkey').text) except functions.SendRequestError as err: print(err) raise SystemExit elif session_type is 'T': try:
start_time = ''.join(start_time) start_time = start_time + ":00" # create 2 versions of the host to use to create the meeting because for some sites it errors out # when using the full email address and for others, when you just use the userid #first version is the full email address with domain hostfull = host #second version removes the domain and keeps just the username hostshort = host = host.split("@")[0] try: response = functions.CreateMeeting( functions.sessionSecurityContext, meetingPassword='******', meetingName=meeting_name, agenda=agenda, startDate=start_time, duration=duration, host=hostfull, attendees=attendees) meeting_key = response.find( '{*}body/{*}bodyContent/{*}meetingkey').text print('Meeting Key:', meeting_key) SetAlternateHost = functions.AlternateHost( functions.sessionSecurityContext, meetingKey=meeting_key, alternateHost=alternate_host) except functions.SendRequestError as err: