README.md in twilio-ruby-4.3.0 vs README.md in twilio-ruby-4.4.0

- old
+ new

@@ -116,21 +116,44 @@ # buy the first one @number = @numbers[0].phone_number @client.incoming_phone_numbers.create(phone_number: @number) ``` -## Getting Started With Client Capability Tokens +## 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). + +``` ruby +require 'rubygems' +require 'twilio-ruby' + +# put your own account credentials here: +account_sid = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' +auth_token = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy' +workspace_sid = 'WSzzzzzzzzzzzzzzzzzzzzzzzzzzz' + +# set up a client +client = Twilio::REST::TaskRouterClient.new account_sid, auth_token, workspace_sid + +# create a task +workflow_sid = 'WWffffffffffffffffffffffffffff' +client.workspace.tasks.create(attributes: '{"foo": "bar"}', workflow_sid: "WWfffffffffffffffffffffffffffffff") +``` + +## Create a Twilio Client Capability Token + If you just need to generate a Capability Token for use with Twilio Client, you can do this: ``` ruby require 'rubygems' # not necessary with ruby 1.9 but included for completeness require 'twilio-ruby' # put your own account credentials here: -account_sid = 'AC043dcf9844e13758bc3a36a84c29761' -auth_token = '62ea81de3a5b413254eb263595357c69' +account_sid = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' +auth_token = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy' # set up capability = Twilio::Util::Capability.new account_sid, auth_token # allow outgoing calls to an application