TruxtonChildFileIO newcommunication
Jump to navigation
Jump to search
This create new communication object from a file in Truxton.
It automatically associates the parent file and media identifiers used in the [Message] table.
Syntax
object newcommunication();
Return value
An communication object
Sample
1 def main():
2 t = truxton.create()
3 file = t.getfileid("5ec2a123-74d6-5da7-0653-4e6800000000")
4
5 communication = file.newcommunication()
6
7 communication.sent = ticks("2015-08-16T21:31:37-00:00");
8 communication.received = communication.sent
9 communication.subject = "Dinner at 8?"
10 communication.type = truxton.MESSAGE_TYPE_SMS
11 communication.save()
12
13 communication.addparticipant("703.555.1212", truxton.MESSAGE_PARTICIPANT_FROM)
14 communication.addparticipant("202.555.1212", truxton.MESSAGE_PARTICIPANT_TO)
15
16 communication.finished()
17
18 if __name__ == "__main__":
19 main()