コード例 #1
0
 def connect(self, api_key):
     self._api_key = api_key
     self.cache = Cache(api_key)
     self.warnings = WarningLogger()
     self.con = self.warnings.proxy(BaseConnection(self._api_key, self._secure))
     if self._check and not self.ping():
         raise MCConnectionFailed()
     self.is_connected = True
コード例 #2
0
 def connect(self, api_key):
     self._api_key = api_key
     self.cache = Cache(api_key)
     self.warnings = WarningLogger()
     self.con = self.warnings.proxy(
         BaseConnection(self._api_key, self._secure))
     if self._check:
         status = self.ping()
         if status != STATUS_OK:
             raise MCConnectionFailed(status)
     self.is_connected = True