| 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 ' TUserContext createContext(TUserContext context, bool updateExisting)'
|
24 |
print ' UserContext createContext(UserContext context, bool updateExisting)'
|
| 25 |
print ' TUserContext getContextFromId(i64 userId)'
|
25 |
print ' UserContext getContextFromId(i64 userId, bool isSessionId)'
|
| 26 |
print ' TUserContext getContextFromEmailOrHandle(string emailorhandle, bool isEmail)'
|
26 |
print ' UserContext getContextFromEmailOrHandle(string emailorhandle, bool isEmail)'
|
| 27 |
print ' TUserState getState(i64 userId)'
|
27 |
print ' UserState getState(i64 userId, bool isSessionId)'
|
| 28 |
print ' TUserPrimaryInfo getPrimaryInfo(i64 userId)'
|
28 |
print ' UserPrimaryInfo getPrimaryInfo(i64 userId, bool isSessionId)'
|
| 29 |
print ' TUserInternalInfo getInternalInfo(i64 userId)'
|
29 |
print ' UserInternalInfo getInternalInfo(i64 userId, bool isSessionId)'
|
| 30 |
print ' TUserContext getContext(string email, string password)'
|
30 |
print ' UserContext getContext(string email, string password)'
|
| - |
|
31 |
print ' bool authenticateUser(string handle, string password, bool isEmail)'
|
| 31 |
print ' bool userExists(string email)'
|
32 |
print ' bool userExists(string email)'
|
| 32 |
print ' bool addIpAdressForUser(string ip, i64 timestamp, i64 userId)'
|
33 |
print ' bool addIpAdressForUser(string ip, i64 timestamp, i64 userId)'
|
| 33 |
print ' bool addAddressForUser(TAddress address, i64 userid, i64 timestamp)'
|
34 |
print ' bool addAddressForUser(Address address, i64 userid, i64 timestamp)'
|
| 34 |
print ' bool removeAddressForUser(i64 userid, i64 addressId)'
|
35 |
print ' bool removeAddressForUser(i64 userid, i64 addressId)'
|
| 35 |
print ' bool setUserAsLoggedIn(i64 userId, i64 timestamp)'
|
36 |
print ' bool setUserAsLoggedIn(i64 userId, i64 timestamp)'
|
| 36 |
print ' bool setUserAsLoggedOut(i64 userid, i64 timestamp)'
|
37 |
print ' bool setUserAsLoggedOut(i64 userid, i64 timestamp)'
|
| 37 |
print ' bool updatePassword(i64 userid, string password)'
|
38 |
print ' bool updatePassword(i64 userid, string password)'
|
| 38 |
print ' bool deleteUser(i64 userid)'
|
39 |
print ' bool deleteUser(i64 userid, bool isSessionId)'
|
| 39 |
print ' bool sendEmailVerification(i64 userid)'
|
40 |
print ' bool sendEmailVerification(i64 userid)'
|
| 40 |
print ' bool sendSMSVerification(i64 userid)'
|
41 |
print ' bool sendSMSVerification(i64 userid)'
|
| 41 |
print ' bool confirmEmailVerification(i64 userid)'
|
42 |
print ' bool confirmEmailVerification(i64 userid)'
|
| 42 |
print ' bool confirmSMSVerification(i64 userid)'
|
43 |
print ' bool confirmSMSVerification(i64 userid)'
|
| 43 |
print ' bool addSocialhandle(i64 userid, string socialService, string handle)'
|
44 |
print ' bool addSocialhandle(i64 userid, string socialService, string handle)'
|
| Line 94... |
Line 95... |
| 94 |
print 'createContext requires 2 args'
|
95 |
print 'createContext requires 2 args'
|
| 95 |
sys.exit(1)
|
96 |
sys.exit(1)
|
| 96 |
pp.pprint(client.createContext(eval(args[0]),eval(args[1]),))
|
97 |
pp.pprint(client.createContext(eval(args[0]),eval(args[1]),))
|
| 97 |
|
98 |
|
| 98 |
elif cmd == 'getContextFromId':
|
99 |
elif cmd == 'getContextFromId':
|
| 99 |
if len(args) != 1:
|
100 |
if len(args) != 2:
|
| 100 |
print 'getContextFromId requires 1 args'
|
101 |
print 'getContextFromId requires 2 args'
|
| 101 |
sys.exit(1)
|
102 |
sys.exit(1)
|
| 102 |
pp.pprint(client.getContextFromId(eval(args[0]),))
|
103 |
pp.pprint(client.getContextFromId(eval(args[0]),eval(args[1]),))
|
| 103 |
|
104 |
|
| 104 |
elif cmd == 'getContextFromEmailOrHandle':
|
105 |
elif cmd == 'getContextFromEmailOrHandle':
|
| 105 |
if len(args) != 2:
|
106 |
if len(args) != 2:
|
| 106 |
print 'getContextFromEmailOrHandle requires 2 args'
|
107 |
print 'getContextFromEmailOrHandle requires 2 args'
|
| 107 |
sys.exit(1)
|
108 |
sys.exit(1)
|
| 108 |
pp.pprint(client.getContextFromEmailOrHandle(args[0],eval(args[1]),))
|
109 |
pp.pprint(client.getContextFromEmailOrHandle(args[0],eval(args[1]),))
|
| 109 |
|
110 |
|
| 110 |
elif cmd == 'getState':
|
111 |
elif cmd == 'getState':
|
| 111 |
if len(args) != 1:
|
112 |
if len(args) != 2:
|
| 112 |
print 'getState requires 1 args'
|
113 |
print 'getState requires 2 args'
|
| 113 |
sys.exit(1)
|
114 |
sys.exit(1)
|
| 114 |
pp.pprint(client.getState(eval(args[0]),))
|
115 |
pp.pprint(client.getState(eval(args[0]),eval(args[1]),))
|
| 115 |
|
116 |
|
| 116 |
elif cmd == 'getPrimaryInfo':
|
117 |
elif cmd == 'getPrimaryInfo':
|
| 117 |
if len(args) != 1:
|
118 |
if len(args) != 2:
|
| 118 |
print 'getPrimaryInfo requires 1 args'
|
119 |
print 'getPrimaryInfo requires 2 args'
|
| 119 |
sys.exit(1)
|
120 |
sys.exit(1)
|
| 120 |
pp.pprint(client.getPrimaryInfo(eval(args[0]),))
|
121 |
pp.pprint(client.getPrimaryInfo(eval(args[0]),eval(args[1]),))
|
| 121 |
|
122 |
|
| 122 |
elif cmd == 'getInternalInfo':
|
123 |
elif cmd == 'getInternalInfo':
|
| 123 |
if len(args) != 1:
|
124 |
if len(args) != 2:
|
| 124 |
print 'getInternalInfo requires 1 args'
|
125 |
print 'getInternalInfo requires 2 args'
|
| 125 |
sys.exit(1)
|
126 |
sys.exit(1)
|
| 126 |
pp.pprint(client.getInternalInfo(eval(args[0]),))
|
127 |
pp.pprint(client.getInternalInfo(eval(args[0]),eval(args[1]),))
|
| 127 |
|
128 |
|
| 128 |
elif cmd == 'getContext':
|
129 |
elif cmd == 'getContext':
|
| 129 |
if len(args) != 2:
|
130 |
if len(args) != 2:
|
| 130 |
print 'getContext requires 2 args'
|
131 |
print 'getContext requires 2 args'
|
| 131 |
sys.exit(1)
|
132 |
sys.exit(1)
|
| 132 |
pp.pprint(client.getContext(args[0],args[1],))
|
133 |
pp.pprint(client.getContext(args[0],args[1],))
|
| 133 |
|
134 |
|
| - |
|
135 |
elif cmd == 'authenticateUser':
|
| - |
|
136 |
if len(args) != 3:
|
| - |
|
137 |
print 'authenticateUser requires 3 args'
|
| - |
|
138 |
sys.exit(1)
|
| - |
|
139 |
pp.pprint(client.authenticateUser(args[0],args[1],eval(args[2]),))
|
| - |
|
140 |
|
| 134 |
elif cmd == 'userExists':
|
141 |
elif cmd == 'userExists':
|
| 135 |
if len(args) != 1:
|
142 |
if len(args) != 1:
|
| 136 |
print 'userExists requires 1 args'
|
143 |
print 'userExists requires 1 args'
|
| 137 |
sys.exit(1)
|
144 |
sys.exit(1)
|
| 138 |
pp.pprint(client.userExists(args[0],))
|
145 |
pp.pprint(client.userExists(args[0],))
|
| Line 172... |
Line 179... |
| 172 |
print 'updatePassword requires 2 args'
|
179 |
print 'updatePassword requires 2 args'
|
| 173 |
sys.exit(1)
|
180 |
sys.exit(1)
|
| 174 |
pp.pprint(client.updatePassword(eval(args[0]),args[1],))
|
181 |
pp.pprint(client.updatePassword(eval(args[0]),args[1],))
|
| 175 |
|
182 |
|
| 176 |
elif cmd == 'deleteUser':
|
183 |
elif cmd == 'deleteUser':
|
| 177 |
if len(args) != 1:
|
184 |
if len(args) != 2:
|
| 178 |
print 'deleteUser requires 1 args'
|
185 |
print 'deleteUser requires 2 args'
|
| 179 |
sys.exit(1)
|
186 |
sys.exit(1)
|
| 180 |
pp.pprint(client.deleteUser(eval(args[0]),))
|
187 |
pp.pprint(client.deleteUser(eval(args[0]),eval(args[1]),))
|
| 181 |
|
188 |
|
| 182 |
elif cmd == 'sendEmailVerification':
|
189 |
elif cmd == 'sendEmailVerification':
|
| 183 |
if len(args) != 1:
|
190 |
if len(args) != 1:
|
| 184 |
print 'sendEmailVerification requires 1 args'
|
191 |
print 'sendEmailVerification requires 1 args'
|
| 185 |
sys.exit(1)
|
192 |
sys.exit(1)
|