2 from PLC.Faults import *
3 from PLC.Method import Method
4 from PLC.Parameter import Parameter
5 from PLC.Messages import Message, Messages
6 from PLC.Auth import Auth
8 class AddMessage(Method):
10 Adds a new message template. Any values specified in
11 message_fields are used, otherwise defaults are used.
13 Returns 1 if successful, faults otherwise.
23 returns = Parameter(int, '1 if successful')
26 def call(self, auth, message_fields):
27 message = Message(self.api, message_fields)
28 message.sync(insert = True)