Ejemplo n.º 1
0
    def __init__(self, cfg: Union[str, dict]):
        """Initializes Class

        Args:
            cfg (Union[str, dict]): As a str it should contain a full path
                pointing to a configuration file (json/toml). See
                config.* in the examples folder for reference."""
        BaseApiClient.__init__(self, cfg=cfg)
        self.logged_in: bool = False
Ejemplo n.º 2
0
    def __init__(self, cfg: Union[str, dict]):
        """Initializes Class

        Args:
            cfg (Union[str, dict]): As a str it should contain a full path
                pointing to a configuration file (json/toml). See
                config.* in the examples folder for reference.
            sem (Optional[int]): An integer that defines the number of parallel
                requests to make."""
        BaseApiClient.__init__(self, cfg=cfg)
Ejemplo n.º 3
0
    def __init__(self, cfg: Union[str, dict], autoconnect=True):
        BaseApiClient.__init__(self, cfg=cfg)
        self.adserver: Server = Server(self.cfg['URI']['Base'], get_info=ALL)

        if autoconnect:
            self.connection: Connection = Connection(
                self.adserver,
                auto_bind=True,
                user=self.cfg['Auth']['Username'],
                password=self.cfg['Auth']['Password'],
                authentication=self.cfg['Auth']['Type'] or None)
        else:
            self.connection = None
Ejemplo n.º 4
0
 def __init__(self, cfg: Union[str, dict], sem: Optional[int] = None):
     BaseApiClient.__init__(self, cfg=cfg, sem=sem or self.SEM)