docs/getting-started.rst in twilio-ruby-4.3.0 vs docs/getting-started.rst in twilio-ruby-4.4.0

- old
+ new

@@ -85,9 +85,30 @@ <?xml version="1.0" encoding="utf-8"?> <Response> <Play loop="5">https://api.twilio.com/cowbell.mp3</Play> <Response> +Create a Task with TaskRouter +================= + +If you need to create a Task to TaskRouter, you can do so by using the TaskRouterClient. + +Additional resources had off of the workspace object (task_queues, workers, workflows, activities, tasks, statistics, events). + +.. code-block:: ruby + + require 'twilio-ruby' + + # To find these visit https://www.twilio.com/user/account + account_sid = "ACXXXXXXXXXXXXXXXXX" + auth_token = "YYYYYYYYYYYYYYYYYY" + workspace_sid = "WSzzzzzzzzzzzzzzzzzzzzzzzzzzz" + + client = Twilio::REST::TaskRouterClient.new account_sid, auth_token, workspace_sid + + workflow_sid = "WFzzzzzzzzzzzzz" + task = client.workspace.tasks.create(attributes: '{"foo":"bar"}', workflow_sid: workflow_sid) + Digging Deeper ======================== The full power of the Twilio API is at your fingertips. The :ref:`user-guide`