def get_connector(self, connector_id): resp_dict = self._root.get('%s/connector/%d/' % (API_VERSION, connector_id), headers=self.headers) if resp_dict['connector']: return Connector.from_dict(resp_dict['connector']) return None
def get_connectors(self): resp_dict = self._root.get('%s/connectors' % API_VERSION, headers=self.headers) connectors = [ Connector.from_dict(connector_dict) for connector_dict in resp_dict['connectors'] ] return connectors