@@ -64,26 +64,26 @@ unique ID:
64
64
# Some JSON to configure the Workflow. See the documentation at
65
65
# http://www.twilio.com/docs/taskrouter for more details.
66
66
CONFIG = """
67
- {
68
- "task_routing":{
69
- "filters":[
70
- {
71
- "friendly_name":"Gold Tickets",
72
- "expression":"customer_value == 'Gold' AND type == 'ticket'",
73
- "targets":[
74
- {
75
- "task_queue_sid":"WQ0123456789abcdef0123456789abcdef",
76
- "priority":"2"
77
- }
78
- ]
79
- }
80
- ],
81
- "default_filter":{
82
- "task_queue_sid":"WQabcdef01234567890123456789abcdef"
83
- }
84
- }
85
- }
86
- """
67
+ {
68
+ "task_routing":{
69
+ "filters":[
70
+ {
71
+ "friendly_name":"Gold Tickets",
72
+ "expression":"customer_value == 'Gold' AND type == 'ticket'",
73
+ "targets":[
74
+ {
75
+ "task_queue_sid":"WQ0123456789abcdef0123456789abcdef",
76
+ "priority":"2"
77
+ }
78
+ ]
79
+ }
80
+ ],
81
+ "default_filter":{
82
+ "task_queue_sid":"WQabcdef01234567890123456789abcdef"
83
+ }
84
+ }
85
+ }
86
+ """
87
87
88
88
client = TwilioTaskRouterClient(ACCOUNT_SID , AUTH_TOKEN )
89
89
@@ -146,10 +146,10 @@ To create a new :class:`Worker`:
146
146
worker = client.workers(WORKSPACE_SID ).create(
147
147
friendly_name = " Jamie" ,
148
148
attributes = """ {
149
- "phone": "+14155551234",
150
- "languages": ["EN", "ES"]
151
- }
152
- """
149
+ "phone": "+14155551234",
150
+ "languages": ["EN", "ES"]
151
+ }
152
+ """
153
153
)
154
154
print worker.sid
155
155
@@ -207,12 +207,12 @@ To create a new :class:`Task` via the REST API:
207
207
WORKSPACE_SID = " WSZZZZZZZZZZZZZZ"
208
208
# Some JSON containing attributes for this task. User-defined.
209
209
TASK_ATTRIBUTES = """ {
210
- "type": "call",
211
- "contact": "+15558675309",
212
- "customer-value": "gold",
213
- "task-reason": "support",
214
- "callSid": "CA42ed11..."
215
- }"""
210
+ "type": "call",
211
+ "contact": "+15558675309",
212
+ "customer-value": "gold",
213
+ "task-reason": "support",
214
+ "callSid": "CA42ed11..."
215
+ }"""
216
216
217
217
218
218
client = TwilioTaskRouterClient(ACCOUNT_SID , AUTH_TOKEN )
0 commit comments