def __init__(self): self.transport = THttpClient.THttpClient("https://"+self.host,None, self.http_query_path) self.transport.setCustomHeaders({ "X-Line-Application" : self.LA,"User-Agent" : self.UA}) self.transport.open() self.protocol = TCompactProtocol.TCompactProtocol(self.transport); self.client = LineService.Client(self.protocol)
def __init__(self, authToken): self.transport = THttpClient.THttpClient("https://"+self.host, None, self.http_query_path) self.transport.path = self.auth_query_path self.transport.setCustomHeaders({"X-Line-Application" : self.LA,"User-Agent" : self.UA,"X-Line-Access": authToken}) self.protocol = TCompactProtocol.TCompactProtocol(self.transport); self.client = LineService.Client(self.protocol) self.rev = self.client.getLastOpRevision() self.transport.path = self.polling_path self.transport.open()
def __init__(self, authToken): self.authToken = authToken self.transport = THttpClient.THttpClient("https://"+self.host, None, self.http_query_path) self.transport.path = self.http_query_path self.transport.setCustomHeaders({"X-Line-Application" : self.LA,"User-Agent" : self.UA,"X-Line-Access": authToken}) self.transport.open() self.protocol = TCompactProtocol.TCompactProtocol(self.transport) self.client = LineService.Client(self.protocol) self.mid = self.client.getProfile().mid self.transport.path = self.channel_query_path
def __init__(self): self.transport = THttpClient.THttpClient( 'https://gf.line.naver.jp:80' + self.auth_query_path) self.transport.setCustomHeaders({ "User-Agent": self.UA, "X-Line-Application": self.LA, }) self.transport.open() self.protocol = TCompactProtocol.TCompactProtocol(self.transport) self.client = LineService.Client(self.protocol)