|
14 | 14 | try:
|
15 | 15 | client = messagebird.Client(args['accessKey'])
|
16 | 16 |
|
17 |
| - create_webhook_request = VoiceUpdateWebhookRequest(title=args['title'], token=args['token']) |
18 |
| - webhook = client.voice_update_webhook(args['webhookId'], create_webhook_request) |
| 17 | + update_webhook_request = VoiceUpdateWebhookRequest(title=args['title'], token=args['token']) |
| 18 | + webhook = client.voice_update_webhook(args['webhookId'], update_webhook_request) |
19 | 19 |
|
20 | 20 | # Print the object information.
|
21 | 21 | print('\nThe following information was returned as a Voice Webhook object:\n')
|
22 |
| - print(' id : %s' % webhook.id) |
23 |
| - print(' token : %s' % webhook.token) |
24 |
| - print(' url : %s' % webhook.url) |
25 |
| - print(' createdAtDatetime : %s' % webhook.createdDatetime) |
26 |
| - print(' updatedAtDatetime : %s' % webhook.updatedDatetime) |
| 22 | + print(' id : {}'.format(webhook.id)) |
| 23 | + print(' token : {}'.format(webhook.token)) |
| 24 | + print(' url : {}'.format(webhook.url)) |
| 25 | + print(' createdAtDatetime : {}'.format(webhook.createdDatetime)) |
| 26 | + print(' updatedAtDatetime : {}'.format(webhook.updatedDatetime)) |
27 | 27 |
|
28 | 28 | except messagebird.client.ErrorException as e:
|
29 | 29 | print('An error occured while updating a Voice Webhook object:')
|
30 | 30 |
|
31 | 31 | for error in e.errors:
|
32 |
| - print(' code : %d' % error.code) |
33 |
| - print(' description : %s' % error.description) |
34 |
| - print(' parameter : %s\n' % error.parameter) |
| 32 | + print(' code : {}'.format(error.code)) |
| 33 | + print(' description : {}'.format(error.description)) |
| 34 | + print(' parameter : {}\n'.format(error.parameter)) |
35 | 35 |
|
36 | 36 |
|
37 | 37 |
|
0 commit comments