I'm working on a project where people connect their Basecamp accounts via OAuth. As such, I instantiate clients for many different Basecamp accounts.
For the same reason the site option shouldn't be a class variable, it seems like it's a good idea to allow the account option to be passed in.
Instead of:
@account = Bcx.configuration.account
I've been using something like this in my branch.
@account = options[:account] || Bcx.configuration.account
It requires that you know the account id which you can get from the authentication guide. I built another client to make the authorization.json call, but I haven't setup the pull request for it yet. The call returns all of the accounts you have access to which may include Basecamp or Campfire.
I wanted to see what you thought about this. I can get something ready to be considered and merged. Thanks for the awesome start of this project!
I'm working on a project where people connect their Basecamp accounts via OAuth. As such, I instantiate clients for many different Basecamp accounts.
For the same reason the site option shouldn't be a class variable, it seems like it's a good idea to allow the account option to be passed in.
Instead of:
I've been using something like this in my branch.
It requires that you know the account id which you can get from the authentication guide. I built another client to make the
authorization.jsoncall, but I haven't setup the pull request for it yet. The call returns all of the accounts you have access to which may include Basecamp or Campfire.I wanted to see what you thought about this. I can get something ready to be considered and merged. Thanks for the awesome start of this project!