File tree Expand file tree Collapse file tree 14 files changed +96
-90
lines changed Expand file tree Collapse file tree 14 files changed +96
-90
lines changed Original file line number Diff line number Diff line change 1919 'content' : {'text' : args ['message' ]}})
2020
2121 # Print the object information.
22- print ('\n The following information was returned as a Conversation List object:\n ' )
23- print (' message id : %s' % msg .id )
24- print (' channel id : %s' % msg .channelId )
25- print (' direction : %s' % msg .direction )
26- print (' content : %s' % msg .content )
27- print (' content : %s' % msg .content )
28- print (' status : %s' % msg .status )
29- print (' type : %s' % msg .type )
30- print (' created date : %s' % msg .createdDatetime )
31- print (' updated date : %s' % msg .updatedDatetime )
22+ print ('The following information was returned as a Conversation List object:\n ' )
23+ print (msg )
3224
3325except messagebird .client .ErrorException as e :
3426 print ('\n An error occured while requesting a Message object:\n ' )
Original file line number Diff line number Diff line change 2121 })
2222
2323 # Print the object information.
24- print ('\n The following information was returned as a Webhook object:\n ' )
25- print (' id : %s' % webhook .id )
26- print (' events : %s' % webhook .events )
27- print (' channel id : %s' % webhook .channelId )
28- print (' created date : %s' % webhook .createdDatetime )
29- print (' updated date : %s' % webhook .updatedDatetime )
24+ print ('The following information was returned as a Webhook object:' )
25+ print (webhook )
3026
3127except messagebird .client .ErrorException as e :
3228 print ('\n An error occured while requesting a Webhook object:\n ' )
Original file line number Diff line number Diff line change 1313 client .conversation_delete_webhook (args ['webhookId' ])
1414
1515 # Print the object information.
16- print ('\n Webhook has been deleted: \n ' )
16+ print ('Webhook has been deleted' )
1717
1818except messagebird .client .ErrorException as e :
1919 print ('\n An error occured while requesting a Webhook object:\n ' )
Original file line number Diff line number Diff line change 1111
1212 conversationList = client .conversation_list ()
1313
14- itemIds = []
15- for msgItem in conversationList .items :
16- itemIds .append (msgItem .id )
17-
1814 # Print the object information.
19- print ('\n The following information was returned as a Conversation List object:\n ' )
20- print (' conversation ids : %s' % itemIds )
21- print (' offset : %s' % conversationList .offset )
22- print (' limit : %s' % conversationList .limit )
23- print (' totalCount : %s' % conversationList .totalCount )
15+ print ('The following information was returned as a Conversation List object:' )
16+ print (conversationList )
2417
2518except messagebird .client .ErrorException as e :
26- print ('\n An error occured while requesting a Message object:\n ' )
19+ print ('An error occured while requesting a Message object:' )
2720
2821 for error in e .errors :
2922 print (' code : %d' % error .code )
Original file line number Diff line number Diff line change 1212
1313 msg = client .conversation_list_messages (args ['conversationId' ])
1414
15- itemIds = []
16- for msgItem in msg .items :
17- itemIds .append (msgItem .id )
18-
1915 # Print the object information.
20- print ('\n The following information was returned as a Conversation Message List object:\n ' )
21- print (' message ids : %s' % itemIds )
22- print (' offset : %s' % msg .offset )
23- print (' limit : %s' % msg .limit )
24- print (' totalCount : %s' % msg .totalCount )
16+ print ('The following information was returned as a Conversation Message List object:' )
17+ print (msg )
2518
2619except messagebird .client .ErrorException as e :
2720 print ('\n An error occured while requesting a Conversation Message List object:\n ' )
Original file line number Diff line number Diff line change 99try :
1010 client = messagebird .Client (args ['accessKey' ])
1111
12- webhookList = client .conversation_list_webhooks ()
13-
14- itemIds = []
15- for msgItem in webhookList .items :
16- itemIds .append (msgItem .id )
12+ webhook_list = client .conversation_list_webhooks ()
1713
1814 # Print the object information.
19- print ('\n The following information was returned as a Conversation Webhook List object:\n ' )
20- print (' conversation ids : %s' % itemIds )
21- print (' offset : %s' % webhookList .offset )
22- print (' limit : %s' % webhookList .limit )
23- print (' totalCount : %s' % webhookList .totalCount )
15+ print ('The following information was returned as a Conversation Webhook List object:' )
16+ print (webhook_list )
2417
2518except messagebird .client .ErrorException as e :
2619 print ('\n An error occured while requesting a Conversation Webhook List object:\n ' )
Original file line number Diff line number Diff line change 1313 conversation = client .conversation_read (args ['conversationId' ])
1414
1515 # Print the object information.
16- print ('\n The following information was returned as a Conversation object:\n ' )
17- print (' conversation id : %s' % conversation .id )
18- print (' contact id : %s' % conversation .contactId )
19- print (' messages total count : %s' % conversation .messages .totalCount )
20- print (' status : %s' % conversation .status )
21- print (' created date time : %s' % conversation .createdDatetime )
22- print (' updated date time : %s' % conversation .updatedDatetime )
23- print (' last received date time : %s' % conversation .lastReceivedDatetime )
16+ print ('The following information was returned as a Conversation object:' )
17+ print (conversation )
2418
2519except messagebird .client .ErrorException as e :
2620 print ('\n An error occured while requesting a Conversation object:\n ' )
Original file line number Diff line number Diff line change 1313 msg = client .conversation_read_message (args ['messageId' ])
1414
1515 # Print the object information.
16- print ('\n The following information was returned as a Conversation List object:\n ' )
17- print (' message id : %s' % msg .id )
18- print (' channel id : %s' % msg .channelId )
19- print (' direction : %s' % msg .direction )
20- print (' content : %s' % msg .content )
21- print (' content : %s' % msg .content )
22- print (' status : %s' % msg .status )
23- print (' type : %s' % msg .type )
24- print (' created date : %s' % msg .createdDatetime )
25- print (' updated date : %s' % msg .updatedDatetime )
16+ print ('The following information was returned as a Conversation List object:' )
17+ print (msg )
2618
2719except messagebird .client .ErrorException as e :
2820 print ('\n An error occured while requesting a Message object:\n ' )
Original file line number Diff line number Diff line change 1313 webhook = client .conversation_read_webhook (args ['webhookId' ])
1414
1515 # Print the object information.
16- print ('\n The following information was returned as a Webhook object:\n ' )
17- print (' id : %s' % webhook .id )
18- print (' events : %s' % webhook .events )
19- print (' channel id : %s' % webhook .channelId )
20- print (' created date : %s' % webhook .createdDatetime )
21- print (' updated date : %s' % webhook .updatedDatetime )
16+ print ('The following information was returned as a Webhook object:' )
17+ print (webhook )
2218
2319except messagebird .client .ErrorException as e :
2420 print ('\n An error occured while requesting a Webhook object:\n ' )
Original file line number Diff line number Diff line change 1818 'content' : {'text' : args ['textMessage' ]}})
1919
2020 # Print the object information.
21- print ('\n The following information was returned as a Conversation object:\n ' )
22- print (' id : %s' % msg .id )
23- print (' contact id : %s' % msg .contactId )
24- print (' contact : %s' % msg .contact )
25- print (' last used channel id : %s' % msg .lastUsedChannelId )
26- print (' channels : %s' % msg .channels )
27- print (' messages : %s' % msg .messages )
28- print (' status : %s' % msg .status )
29- print (' createdDateTime : %s' % msg .createdDateTime )
30- print (' updatedDateTime : %s' % msg .updatedDateTime )
31- print (' lastReceivedDateTime : %s' % msg .lastReceivedDateTime )
21+ print ('The following information was returned as a Conversation object:' )
22+ print (msg )
3223
3324except messagebird .client .ErrorException as e :
3425 print ('\n An error occured while requesting a Message object:\n ' )
You can’t perform that action at this time.
0 commit comments