hbnet/dev/json_template-msg-xfer.py

39 lines
822 B
Python
Raw Normal View History

2021-04-21 10:46:52 -07:00
# Types: App, s2s_msg
2021-04-21 14:17:42 -07:00
# Auth: public, private
import json
2021-04-21 10:46:52 -07:00
msg_xfer = {
'mode':'msg_xfer',
2021-04-21 14:17:42 -07:00
'system_name':'ABC',
2021-04-21 10:46:52 -07:00
'response_url':'http://localhost:8093/api/',
2021-04-21 14:17:42 -07:00
'auth_type':'private',
'credentials': {
'user':'test_name',
'password':'passw0rd',
},
'data':{
1:{'source_id':1234,
'destination_id':3153591,
2021-04-21 10:46:52 -07:00
'slot':2,
'msg_type':'unit',
'msg_format':'motorola',
'message':'text of the message'
2021-04-21 14:17:42 -07:00
},
2:{'source_id':1234,
'destination_id':3153591,
'slot':2,
'msg_type':'unit',
'msg_format':'motorola',
'message':'text of the 2nd message'
}
2021-04-21 10:46:52 -07:00
}
}
2021-04-21 14:17:42 -07:00
json_object = json.dumps(msg_xfer, indent = 4)
print(json_object)