def __init__(self, auth_service, username, password, hash_key=None, hash_key_provider=None, proxy_url=None, proxy_provider=None): self.auth_service = auth_service self.username = username self.password = password # Initialize hash keys self._hash_key = None if hash_key_provider and not hash_key_provider.is_empty(): self._hash_key_provider = hash_key_provider elif hash_key: self._hash_key_provider = CyclicResourceProvider(hash_key) self._hash_key = hash_key else: self._hash_key_provider = None # Initialize proxies self._proxy_url = None if proxy_provider and not proxy_provider.is_empty(): self._proxy_provider = proxy_provider elif proxy_url: self._proxy_provider = CyclicResourceProvider(proxy_url) self._proxy_url = proxy_url else: self._proxy_provider = None self.cfg = _mr_mime_cfg.copy() # Tutorial state and warn/ban flags self.player_state = {} # Trainer statistics self.player_stats = {} self.captcha_url = None # Inventory information self.inventory = None self.inventory_balls = 0 self.inventory_total = 0 # Location self.latitude = None self.longitude = None self.altitude = None # Last log message (for GUI/console) self.last_msg = "" # --- private fields self._api = PGoApi(device_info=self._generate_device_info()) self._download_settings_hash = None self._asset_time = 0 self._item_templates_time = 0 # Timestamp when last API request was made self._last_request = 0 # Timestamp of last get_map_objects request self._last_gmo = self._last_request # Timestamp for incremental inventory updates self._last_timestamp_ms = None # Timestamp when previous user action is completed self._last_action = 0 self._map_cells = []
def __init__(self, auth_service, username, password, hash_key=None, hash_key_provider=None, proxy_url=None, proxy_provider=None): self.auth_service = auth_service self.username = username self.password = password # Get myself a copy of the config self.cfg = _mr_mime_cfg.copy() # Initialize hash keys self._hash_key = None if hash_key_provider and not hash_key_provider.is_empty(): self._hash_key_provider = hash_key_provider elif hash_key: self._hash_key_provider = CyclicResourceProvider(hash_key) self._hash_key = hash_key else: self._hash_key_provider = None # Initialize proxies self._proxy_url = None if proxy_provider and not proxy_provider.is_empty(): self._proxy_provider = proxy_provider elif proxy_url: self._proxy_provider = CyclicResourceProvider(proxy_url) self._proxy_url = proxy_url else: self._proxy_provider = None # Captcha self.captcha_url = None # Inventory information self.inbox = {} self.inventory = None self.inventory_balls = 0 self.inventory_lures = 0 self.inventory_total = 0 self.incubators = [] self.pokemon = {} self.eggs = [] # Current location self.latitude = None self.longitude = None self.altitude = None # Count number of rareless scans (to detect shadowbans) self.rareless_scans = None self.shadowbanned = None # Last log message (for GUI/console) self.last_msg = "" # --- private fields self._reset_api() # Will be set to true if a request returns a BAD_REQUEST response which equals a ban self._bad_request_ban = False # Tutorial state and warn/ban flags self._player_state = {} # Trainer statistics self._player_stats = None # PGPool self._pgpool_auto_update_enabled = mrmime_pgpool_enabled( ) and self.cfg['pgpool_auto_update'] self._last_pgpool_update = time.time() self.callback_egg_hatched = None
def __init__(self, auth_service, username, password, hash_key=None, hash_key_provider=None, proxy_url=None, proxy_provider=None): self.auth_service = auth_service self.username = username self.password = password # Get myself a copy of the config self.cfg = _mr_mime_cfg.copy() # Initialize hash keys self._hash_key = None if hash_key_provider and not hash_key_provider.is_empty(): self._hash_key_provider = hash_key_provider elif hash_key: self._hash_key_provider = CyclicResourceProvider(hash_key) self._hash_key = hash_key else: self._hash_key_provider = None # Initialize proxies self._proxy_url = None if proxy_provider and not proxy_provider.is_empty(): self._proxy_provider = proxy_provider elif proxy_url: self._proxy_provider = CyclicResourceProvider(proxy_url) self._proxy_url = proxy_url else: self._proxy_provider = None # Captcha self.captcha_url = None # Inventory information self.inbox = {} self.inventory = None self.inventory_balls = 0 self.inventory_total = 0 self.incubators = [] self.pokemon = {} self.eggs = [] # Current location self.latitude = None self.longitude = None self.altitude = None # Count number of rareless scans (to detect shadowbans) self.rareless_scans = 0 self.shadowbanned = False # Last log message (for GUI/console) self.last_msg = "" # --- private fields self._api = PGoApi(device_info=self._generate_device_info()) self._download_settings_hash = None self._asset_time = 0 self._item_templates_time = 0 # Will be set to true if a request returns a BAD_REQUEST response which equals a ban self._bad_request_ban = False # Timestamp when last API request was made self._last_request = 0 # Timestamp of last get_map_objects request self._last_gmo = self._last_request # Timestamp for incremental inventory updates self._last_timestamp_ms = None # Timestamp when previous user action is completed self._last_action = 0 # Tutorial state and warn/ban flags self._player_state = {} # Trainer statistics self._player_stats = None # PGPool self._last_pgpool_update = 0