Python akad.ttypes.Message() Examples
The following are 29
code examples of akad.ttypes.Message().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
akad.ttypes
, or try the search function
.
Example #1
Source File: talk.py From linepy-modified with BSD 3-Clause "New" or "Revised" License | 6 votes |
def sendLocation(self, to, address, latitude, longitude, phone=None, contentMetadata={}): msg = Message() msg.to, msg._from = to, self.profile.mid msg.text = "Location by Hello World" msg.contentType, msg.contentMetadata = 0, contentMetadata location = Location() location.address = address location.phone = phone location.latitude = float(latitude) location.longitude = float(longitude) location.title = "Location" msg.location = location if to not in self._messageReq: self._messageReq[to] = -1 self._messageReq[to] += 1 return self.talk.sendMessage(self._messageReq[to], msg)
Example #2
Source File: talk.py From Protect4 with GNU General Public License v3.0 | 5 votes |
def sendText(self, Tomid, text): msg = Message() msg.to = Tomid msg.text = text return self.talk.sendMessage(0, msg)
Example #3
Source File: sb.py From sb with GNU General Public License v3.0 | 5 votes |
def sendMessage(to, Message, contentMetadata={}, contentType=0): mes = Message() mes.to, mes._from = to, profile.mid mes.text = text mes.contentType, mes.contentMetadata = contentType, contentMetadata if to not in messageReq: messageReq[to] = -1 messageReq[to] += 1
Example #4
Source File: talk.py From sb with GNU General Public License v3.0 | 5 votes |
def sendMessageAwaitCommit(self, to, text, contentMetadata={}, contentType=0): msg = Message() msg.to, msg._from = to, self.profile.mid msg.text = text msg.contentType, msg.contentMetadata = contentType, contentMetadata if to not in self._messageReq: self._messageReq[to] = -1 self._messageReq[to] += 1 return self.talk.sendMessageAwaitCommit(self._messageReq[to], msg)
Example #5
Source File: talk.py From sb with GNU General Public License v3.0 | 5 votes |
def sendMessage(self, to, text, contentMetadata={}, contentType=0): msg = Message() msg.to, msg._from = to, self.profile.mid msg.text = text msg.contentType, msg.contentMetadata = contentType, contentMetadata if to not in self._messageReq: self._messageReq[to] = -1 self._messageReq[to] += 1 return self.talk.sendMessage(self._messageReq[to], msg)
Example #6
Source File: talk.py From line-py with BSD 3-Clause "New" or "Revised" License | 5 votes |
def sendMessageAwaitCommit(self, to, text, contentMetadata={}, contentType=0): msg = Message() msg.to, msg._from = to, self.profile.mid msg.text = text msg.contentType, msg.contentMetadata = contentType, contentMetadata if to not in self._messageReq: self._messageReq[to] = -1 self._messageReq[to] += 1 return self.talk.sendMessageAwaitCommit(self._messageReq[to], msg)
Example #7
Source File: talk.py From line-py with BSD 3-Clause "New" or "Revised" License | 5 votes |
def sendMessage(self, to, text, contentMetadata={}, contentType=0): msg = Message() msg.to, msg._from = to, self.profile.mid msg.text = text msg.contentType, msg.contentMetadata = contentType, contentMetadata if to not in self._messageReq: self._messageReq[to] = -1 self._messageReq[to] += 1 return self.talk.sendMessage(self._messageReq[to], msg)
Example #8
Source File: talk.py From SOLO with GNU General Public License v3.0 | 5 votes |
def sendText(self, Tomid, text): msg = Message() msg.to = Tomid msg.text = text return self.talk.sendMessage(0, msg)
Example #9
Source File: talk.py From SOLO with GNU General Public License v3.0 | 5 votes |
def sendMessage(self, to, text, contentMetadata={}, contentType=0): msg = Message() msg.to, msg._from = to, self.profile.mid msg.text = text msg.contentType, msg.contentMetadata = contentType, contentMetadata if to not in self._messageReq: self._messageReq[to] = -1 self._messageReq[to] += 1 return self.talk.sendMessage(self._messageReq[to], msg)
Example #10
Source File: talk.py From ajs2 with GNU General Public License v3.0 | 5 votes |
def sendText(self, Tomid, text): msg = Message() msg.to = Tomid msg.text = text return self.talk.sendMessage(0, msg)
Example #11
Source File: talk.py From ajs2 with GNU General Public License v3.0 | 5 votes |
def sendMessage(self, to, text, contentMetadata={}, contentType=0): msg = Message() msg.to, msg._from = to, self.profile.mid msg.text = text msg.contentType, msg.contentMetadata = contentType, contentMetadata if to not in self._messageReq: self._messageReq[to] = -1 self._messageReq[to] += 1 return self.talk.sendMessage(self._messageReq[to], msg)
Example #12
Source File: talk.py From final with GNU General Public License v3.0 | 5 votes |
def generateReplyMessage(self, relatedMessageId): msg = Message() msg.relatedMessageServiceCode = 1 msg.messageRelationType = 3 msg.relatedMessageId = str(relatedMessageId) return msg
Example #13
Source File: talk.py From final with GNU General Public License v3.0 | 5 votes |
def sendMessageAwaitCommit(self, to, text, contentMetadata={}, contentType=0): msg = Message() msg.to, msg._from = to, self.profile.mid msg.text = text msg.contentType, msg.contentMetadata = contentType, contentMetadata if to not in self._messageReq: self._messageReq[to] = -1 self._messageReq[to] += 1 return self.talk.sendMessageAwaitCommit(self._messageReq[to], msg)
Example #14
Source File: talk.py From final with GNU General Public License v3.0 | 5 votes |
def sendMessage(self, to, text, contentMetadata={}, contentType=0): msg = Message() msg.to, msg._from = to, self.profile.mid msg.text = text msg.contentType, msg.contentMetadata = contentType, contentMetadata if to not in self._messageReq: self._messageReq[to] = -1 self._messageReq[to] += 1 return self.talk.sendMessage(self._messageReq[to], msg)
Example #15
Source File: talk.py From Aditmadzs2 with GNU General Public License v3.0 | 5 votes |
def sendText(self, Tomid, text): msg = Message() msg.to = Tomid msg.text = text return self.talk.sendMessage(0, msg)
Example #16
Source File: talk.py From Aditmadzs2 with GNU General Public License v3.0 | 5 votes |
def sendMessage(self, to, text, contentMetadata={}, contentType=0): msg = Message() msg.to, msg._from = to, self.profile.mid msg.text = text msg.contentType, msg.contentMetadata = contentType, contentMetadata if to not in self._messageReq: self._messageReq[to] = -1 self._messageReq[to] += 1 return self.talk.sendMessage(self._messageReq[to], msg)
Example #17
Source File: talk.py From dpk with GNU General Public License v3.0 | 5 votes |
def sendMessage(self, to, text, contentMetadata={}, contentType=0): msg = Message() msg.to, msg._from = to, self.profile.mid msg.text = text msg.contentType, msg.contentMetadata = contentType, contentMetadata if to not in self._messageReq: self._messageReq[to] = -1 self._messageReq[to] += 1 return self.talk.sendMessage(self._messageReq[to], msg)
Example #18
Source File: talk.py From Protect4 with GNU General Public License v3.0 | 5 votes |
def sendMessage(self, to, text, contentMetadata={}, contentType=0): msg = Message() msg.to, msg._from = to, self.profile.mid msg.text = text msg.contentType, msg.contentMetadata = contentType, contentMetadata if to not in self._messageReq: self._messageReq[to] = -1 self._messageReq[to] += 1 return self.talk.sendMessage(self._messageReq[to], msg)
Example #19
Source File: talk.py From linepy-modified with BSD 3-Clause "New" or "Revised" License | 5 votes |
def generateReplyMessage(self, relatedMessageId): msg = Message() msg.relatedMessageServiceCode = 1 msg.messageRelationType = 3 msg.relatedMessageId = str(relatedMessageId) return msg
Example #20
Source File: talk.py From linepy-modified with BSD 3-Clause "New" or "Revised" License | 5 votes |
def sendMessageWithFooter(self, to, text, title=None, link=None, iconlink=None, contentMetadata={}): msg = Message() msg.to, msg._from = to, self.profile.mid msg.text = text msg.contentType = 0 msg.contentMetadata = self.generateMessageFooter(title, link, iconlink) if contentMetadata: msg.contentMetadata.update(contentMetadata) if to not in self._messageReq: self._messageReq[to] = -1 self._messageReq[to] += 1 return self.talk.sendMessage(self._messageReq[to], msg)
Example #21
Source File: talk.py From linepy-modified with BSD 3-Clause "New" or "Revised" License | 5 votes |
def sendMessageMusic(self, to, title=None, subText=None, url=None, iconurl=None, contentMetadata={}): """ a : Android i : Ios """ self.profile = self.getProfile() self.userTicket = self.generateUserTicket() title = title if title else 'LINE MUSIC' subText = subText if subText else self.profile.displayName url = url if url else 'https://line.me/R/ti/p/' + self.userTicket iconurl = iconurl if iconurl else 'https://obs.line-apps.com/os/p/%s' % self.profile.mid msg = Message() msg.to, msg._from = to, self.profile.mid msg.text = title msg.contentType = 19 msg.contentMetadata = { 'text': title, 'subText': subText, 'a-installUrl': url, 'i-installUrl': url, 'a-linkUri': url, 'i-linkUri': url, 'linkUri': url, 'previewUrl': iconurl, 'type': 'mt', 'a-packageName': 'com.spotify.music', 'countryCode': 'JP', 'id': 'mt000000000a6b79f9' } if contentMetadata: msg.contentMetadata.update(contentMetadata) if to not in self._messageReq: self._messageReq[to] = -1 self._messageReq[to] += 1 return self.talk.sendMessage(self._messageReq[to], msg)
Example #22
Source File: talk.py From linepy-modified with BSD 3-Clause "New" or "Revised" License | 5 votes |
def sendMessage(self, to, text, contentMetadata={}, contentType=0): msg = Message() msg.to, msg._from = to, self.profile.mid msg.text = text msg.contentType, msg.contentMetadata = contentType, contentMetadata if to not in self._messageReq: self._messageReq[to] = -1 self._messageReq[to] += 1 return self.talk.sendMessage(self._messageReq[to], msg)
Example #23
Source File: client.py From simpleSB with BSD 3-Clause "New" or "Revised" License | 5 votes |
def sendMessage(self, to, text, contentMetadata={}, contentType=0): msg = Message() msg.to, msg._from = to, self.profile.mid msg.text = text msg.contentType, msg.contentMetadata = contentType, contentMetadata if to not in self._messageReq: self._messageReq[to] = -1 self._messageReq[to] += 1 return self._client.sendMessage(self._messageReq[to], msg)
Example #24
Source File: client.py From simpleSB with BSD 3-Clause "New" or "Revised" License | 5 votes |
def sendText(self, Tomid, text): msg = Message() msg.to = Tomid msg.text = text return self._client.sendMessage(0, msg)
Example #25
Source File: client.py From simpleSB with BSD 3-Clause "New" or "Revised" License | 5 votes |
def mention(self, to, nama): aa = "" bb = "" strt = int(0) akh = int(0) nm = nama myid = self._client.getProfile().mid if myid in nm: nm.remove(myid) for mm in nm: akh = akh + 6 aa += """{"S":"""+json.dumps(str(strt))+""","E":"""+json.dumps(str(akh))+""","M":"""+json.dumps(mm)+"},""" strt = strt + 7 akh = akh + 1 bb += "@nrik \n" aa = (aa[:int(len(aa)-1)]) text = bb try: msg = Message() msg.to = to msg.text = text msg.contentMetadata = {'MENTION':'{"MENTIONEES":['+aa+']}'} msg.contentType = 0 self._client.sendMessage(0, msg) except Exception as error: print(error, 'def Mention')
Example #26
Source File: talk.py From dpk with GNU General Public License v3.0 | 5 votes |
def textDPK(self, Tomid, text): msg = Message() msg.to = Tomid t1 = "Ì" t2 = "Ì" DPK = t1 + text + t2 msg.text = DPK.replace("\n", " ") return self.talk.sendMessage(0, msg)
Example #27
Source File: talk.py From dpk with GNU General Public License v3.0 | 5 votes |
def kedapkedip(self, Tomid, text): msg = Message() msg.to = Tomid t1 = "\xf4\x80\xb0\x82\xf4\x80\xb0\x82\xf4\x80\xb0\x82\xf4\x80\xb0\x82\xf4\x80\xa0\x81\xf4\x80\xa0\x81\xf4\x80\xa0\x81" t2 = "\xf4\x80\x82\xb3\xf4\x8f\xbf\xbf" DPK = t1 + text + t2 msg.text = DPK.replace("\n", " ") return self.talk.sendMessage(0, msg)
Example #28
Source File: talk.py From dpk with GNU General Public License v3.0 | 5 votes |
def sendText(self, Tomid, text): msg = Message() msg.to = Tomid msg.text = text return self.talk.sendMessage(0, msg)
Example #29
Source File: talk.py From dpk with GNU General Public License v3.0 | 5 votes |
def sendMessageAwaitCommit(self, to, text, contentMetadata={}, contentType=0): msg = Message() msg.to, msg._from = to, self.profile.mid msg.text = text msg.contentType, msg.contentMetadata = contentType, contentMetadata if to not in self._messageReq: self._messageReq[to] = -1 self._messageReq[to] += 1 return self.talk.sendMessageAwaitCommit(self._messageReq[to], msg)