| Line 19... |
Line 19... |
| 19 |
if len(sys.argv) <= 1 or sys.argv[1] == '--help':
|
19 |
if len(sys.argv) <= 1 or sys.argv[1] == '--help':
|
| 20 |
print ''
|
20 |
print ''
|
| 21 |
print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]'
|
21 |
print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]'
|
| 22 |
print ''
|
22 |
print ''
|
| 23 |
print 'Functions:'
|
23 |
print 'Functions:'
|
| 24 |
print ' void closeSession()'
|
- |
|
| 25 |
print ' i64 saveUserEmailForSending(string emailTo, string emailFrom, string subject, string body, string source, string emailType)'
|
24 |
print ' i64 saveUserEmailForSending(string emailTo, string emailFrom, string subject, string body, string source, string emailType)'
|
| 26 |
print ' getEmailsToBeSent()'
|
25 |
print ' getEmailsToBeSent()'
|
| 27 |
print ' void markEmailAsSent(i64 emailId)'
|
26 |
print ' void markEmailAsSent(i64 emailId)'
|
| 28 |
print ' void sendMail(Mail mail)'
|
27 |
print ' void sendMail(Mail mail)'
|
| 29 |
print ' void sendText(TextMessage message)'
|
28 |
print ' void sendText(TextMessage message)'
|
| Line 86... |
Line 85... |
| 86 |
transport = TTransport.TBufferedTransport(socket)
|
85 |
transport = TTransport.TBufferedTransport(socket)
|
| 87 |
protocol = TBinaryProtocol.TBinaryProtocol(transport)
|
86 |
protocol = TBinaryProtocol.TBinaryProtocol(transport)
|
| 88 |
client = HelperService.Client(protocol)
|
87 |
client = HelperService.Client(protocol)
|
| 89 |
transport.open()
|
88 |
transport.open()
|
| 90 |
|
89 |
|
| 91 |
if cmd == 'closeSession':
|
- |
|
| 92 |
if len(args) != 0:
|
- |
|
| 93 |
print 'closeSession requires 0 args'
|
- |
|
| 94 |
sys.exit(1)
|
- |
|
| 95 |
pp.pprint(client.closeSession())
|
- |
|
| 96 |
|
- |
|
| 97 |
elif cmd == 'saveUserEmailForSending':
|
90 |
if cmd == 'saveUserEmailForSending':
|
| 98 |
if len(args) != 6:
|
91 |
if len(args) != 6:
|
| 99 |
print 'saveUserEmailForSending requires 6 args'
|
92 |
print 'saveUserEmailForSending requires 6 args'
|
| 100 |
sys.exit(1)
|
93 |
sys.exit(1)
|
| 101 |
pp.pprint(client.saveUserEmailForSending(args[0],args[1],args[2],args[3],args[4],args[5],))
|
94 |
pp.pprint(client.saveUserEmailForSending(args[0],args[1],args[2],args[3],args[4],args[5],))
|
| 102 |
|
95 |
|