How to use the fritzconnection.core.utils.get_xml_root function in fritzconnection

To help you get started, we’ve selected a few fritzconnection examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kbr / fritzconnection / fritzconnection / lib / fritzphonebook.py View on Github external
def _read_phonebook(self, url):
        """
        Read the content of the phonebook with the given `url`. This
        method sets the phone book instance attribute and has no return
        value.
        """
        root = get_xml_root(url, session=self.fc.session)
        self.phonebook = Phonebook()
        process_node(self, root)
github kbr / fritzconnection / fritzconnection / lib / fritzcall.py View on Github external
def _update_calls(self, num=None, days=None):
        result = self.fc.call_action(SERVICE, 'GetCallList')
        url = result['NewCallListURL']
        if days:
            url += f'&days={days}'
        elif num:
            url += f'&max={num}'
        root = get_xml_root(url, session=self.fc.session)
        self.calls = CallCollection(root)
github kbr / fritzconnection / fritzconnection / core / devices.py View on Github external
def add_description(self, source):
        """
        Adds description data about the devices and the according
        services. 'source' is a string with the xml-data, like the
        content of an igddesc- or tr64desc-file.
        """
        root = get_xml_root(source, timeout=self.timeout, session=self.session)
        self.descriptions.append(Description(root))