File: __init__.py

package info (click to toggle)
freedombox 26.2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 82,976 kB
  • sloc: python: 48,504; javascript: 1,736; xml: 481; makefile: 290; sh: 167; php: 32
file content (27 lines) | stat: -rw-r--r-- 641 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
FreedomBox app for api for android app.
"""

from plinth import app as app_module


class ApiApp(app_module.App):
    """FreedomBox app for API for Android app."""

    app_id = 'api'

    _version = 1

    def __init__(self) -> None:
        """Create components for the app."""
        super().__init__()

        info = app_module.Info(app_id=self.app_id, version=self._version,
                               is_essential=True)
        self.add(info)

    def setup(self, old_version):
        """Install and configure the app."""
        super().setup(old_version)
        self.enable()