Sample App? #1

Closed
BobWalsh opened this Issue May 16, 2012 · 5 comments

Projects

None yet

3 participants

@BobWalsh

Hi,

I really like Asana - want to check out its API. Your gem is one of the few Asana Github projects. But I'm new here and need a bit of help re using your gem, specifically, where does

Asana.configure do |client|
client.api_key = 'your_asana_api_key'
end

go? config?

A sample app that grabs say the names of of the api user's workspaces would be a great help!

@rbright
Owner
rbright commented May 16, 2012

Hi Bob,

I created a small sample application at https://github.com/rbright/smart_asana that utilizes my Asana gem. It also has an example usage of the configure block.

Let me know if you have any further questions! Since I put the gem together rather quickly, there are definitely some rough edges. I plan to do an overhaul in the future, but I will keep it similar to the ActiveModel style.

@rbright rbright closed this May 16, 2012
@BobWalsh

Aha! Thanks Ryan!

@BobWalsh

I'm missing something here...

added to my mac unix environmental vars:
export ASANA_API_KEY=thekey

in a new rails app, added config/asana.rb
#!/usr/bin/env ruby
require 'asana'

Asana.configure do |client|
client.api_key = ENV['ASANA_API_KEY']
end

but in rails console, trying to do the sanity check of Asana::User.me I get:

ArgumentError: Missing site URI
from /Users/bob/.rvm/gems/ruby-1.9.3-p194@sites/gems/activeresource-3.2.3/lib/active_resource/connection.rb:34:in `initialize'

or doing users = Asana::User.all, I get:

1.9.3p194 :002 > users = Asana::User.all
NoMethodError: undefined method path' for nil:NilClass from /Users/bob/.rvm/gems/ruby-1.9.3-p194@sites/gems/asana-0.0.3/lib/asana/resource.rb:25:inprefix'

What am I not understanding?

@rbright
Owner
rbright commented May 21, 2012

Hi Bob,

I'll take a look at this and see if there's an issue in one of the gems.

@rbright rbright reopened this May 21, 2012
@rbright rbright closed this Jul 14, 2013
@NanaKwame

Hi,
I am getting the same problem and don't know how to fix it? Could you please tell me what the solution to this is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment