summaryrefslogtreecommitdiff
path: root/py_include/homekit/api/config.py
blob: 00c10971601b90fb4cee5f5caf771eaca174ee93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from ..config import ConfigUnit
from typing import Optional, Union


class WebApiConfig(ConfigUnit):
    NAME = 'web_api'

    @classmethod
    def schema(cls) -> Optional[dict]:
        return {
            'listen_addr': cls._addr_schema(required=True),
            'host': cls._addr_schema(required=True),
            'token': dict(type='string', required=True),
            'recordings_dir': dict(type='string', required=True)
        }