Skip to content

In the both clients, pass account as an option or global configuration. #3

@djhopper01

Description

@djhopper01

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions