def main(): if os.environ.get('HI_AUTH') == None: print('Must set HI_AUTH environment variable') return selected_module = options_menu(MODULES) MODULES[selected_module]()
def get_id_by_email(email): data, success = make_request('GET', '/user/filter/?email={}'.format(email)) if not success: return '', success user_ids = [user['id'] for user in data['users']] if len(user_ids) == 0: return '', False user_id = user_ids[0] if len(user_ids) > 1: options = {option : option for option in user_ids} user_id = options_menu(options) return user_id, True
def registration_entry(): selected_method = options_menu(METHODS) METHODS[selected_method]()
def event_entry(): selected_method = options_menu(METHODS) METHODS[selected_method]()