def status(self, instance: str, api: API) -> bool: try: api.base_url = self.base_url.format(instance) stats = api.add("statistics").get() return True if stats else False except RequestException: return False
def domains(self, instance: str, api: API) -> Optional[int]: api.base_url = self.base_url.format(instance) instance_info = api.add("instance").get() return get(instance_info, "stats.domain_count")
def likes(self, instance: str, api: API) -> Optional[int]: api.base_url = self.base_url.format(instance) stats = api.add("statistics").get() return stats.get("like_count")