Sha256: 3db328214f7ea0daf381ab548fd54ac747c0f4c6fe9cc6d7a07486dd044c03fd

Contents?: true

Size: 572 Bytes

Versions: 21

Compression:

Stored size: 572 Bytes

Contents

require 'bundler'
Bundler.require
require 'asana'

access_token = ENV['ASANA_ACCESS_TOKEN']
unless access_token
  abort "Run this program with the env var ASANA_ACCESS_TOKEN.\n"  \
    "Go to http://app.asana.com/-/account_api to create a personal access token."
end

client = Asana::Client.new do |c|
  c.authentication :access_token, access_token
end

puts "My Workspaces:"
client.workspaces.find_all.each do |workspace|
  puts "\t* #{workspace.name} - tags:"
  client.tags.find_by_workspace(workspace: workspace.id).each do |tag|
    puts "\t\t- #{tag.name}"
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
asana-2.0.0 examples/personal_access_token.rb
asana-1.0.0 examples/personal_access_token.rb
asana-0.10.13 examples/personal_access_token.rb
asana-0.10.12 examples/personal_access_token.rb
asana-0.10.3 examples/personal_access_token.rb
asana-0.10.2 examples/personal_access_token.rb
asana-0.10.1 examples/personal_access_token.rb
asana-0.10.0 examples/personal_access_token.rb
asana-0.9.3 examples/personal_access_token.rb
asana-0.9.2 examples/personal_access_token.rb
asana-0.9.1 examples/personal_access_token.rb
asana-0.9.0 examples/personal_access_token.rb
asana-0.8.1 examples/personal_access_token.rb
asana-0.8.0 examples/personal_access_token.rb
asana-0.6.3 examples/personal_access_token.rb
asana-0.6.2 examples/personal_access_token.rb
asana-0.6.0 examples/personal_access_token.rb
asana-0.5.0 examples/personal_access_token.rb
asana-0.4.0 examples/personal_access_token.rb
asana-0.3.0 examples/personal_access_token.rb