Myrient Api [ UPDATED | 2026 ]
def get_file_info_interactive(api: MyrientAPI): """Get file information""" print("\n--- FILE INFORMATION ---") file_id = input("Enter file ID: ").strip() if not file_id: print("File ID cannot be empty") return info = api.get_file_info(file_id) if not info: print("File not found or error occurred") return print("\nFile Information:") print("-" * 40) for key, value in info.items(): print(f"{key}: {value}")
def main(): """Main program loop""" api = MyrientAPI() print("Myrient API Text Interface") print("Note: This is an unofficial interface") actions = { '1': search_files_interactive, '2': list_systems_interactive, '3': get_file_info_interactive, '4': get_download_link_interactive, } while True: print_menu() choice = input("\nEnter your choice (1-5): ").strip() if choice == '5': print("Goodbye!") break elif choice in actions: actions[choice](api) else: print("Invalid choice. Please try again.") input("\nPress Enter to continue...") myrient api
def list_systems_interactive(api: MyrientAPI): """List all available systems""" print("\n--- AVAILABLE SYSTEMS ---") systems = api.list_systems() if not systems: print("No systems found.") return for i, system in enumerate(systems, 1): print(f"{i}. {system}") system in enumerate(systems