def toxml()

in generate-appstream-releases.py [0:0]


    def toxml(self):
        attrs = {
            'version': self.version,
            'date': self.json['date']
        }
        xml = ElementTree.Element('release', attrib=attrs)

        # Add the details URL which should point to github
        xurl = ElementTree.Element('url', attrib={'type': 'details'})
        xurl.text = f"https://github.com/mozilla-mobile/mozilla-vpn-client/releases/v{self.version}"
        xml.append(xurl)

        # TODO: It is recommended to include a release description in the Appstream
        # manifest too. We could fetch this from the Github releases API, but they
        # aren't very well formatted for this purpose.

        return xml