def __init__(self, username=None, password=None, state=None): self._state = { 'username': username, 'password': password, } self._ajax_api = AjaxApi() self._android_api = AndroidApi() if state is not None: self.set_state(state)
def main( ctx: click.core.Context, username: str, password: str, stdin_password: bool, ) -> None: if not (password or stdin_password): raise click.UsageError( "Must supply one of `password` or `stdin_password`") if stdin_password: password = input() ctx.obj = api = AndroidApi() api.start_session() api.login(account=username, password=password)