1 from PLC.Faults import *
2 from PLC.Method import Method
3 from PLC.Parameter import Parameter
4 from PLC.Messages import Message, Messages
5 from PLC.Auth import Auth
7 class AddMessage(Method):
9 Adds a new message template. Any values specified in
10 message_fields are used, otherwise defaults are used.
12 Returns 1 if successful, faults otherwise.
22 returns = Parameter(int, '1 if successful')
25 object_type = 'Message'
28 def call(self, auth, message_fields):
29 message = Message(self.api, message_fields)
30 message.sync(insert = True)