This gem provides a simple wrapper for the Basecamp API (New, version 1) using OAuth authentication only. Currently it only supports functionality for Todos, TodoLists and Projects
Add this line to your application's Gemfile:
gem 'basecamp'
And then execute:
$ bundle
Or install it yourself as:
$ gem install basecamp
Add the following to a file in your config directory
Basecamp.configure do |c|
c.client_id = <your basecamp client_id>
c.client_secret = <your basecamp secret>
end
This gem uses OAuth2 exclusively for authentication. Basecamp periodically expires their tokens, and they must be refreshed to continue to gain access to the API. There are methods included to facilitate this.
oauth = Basecamp::OAuth.new(:token => <the users token>, :refresh_token => <the users refresh token>)
oauth.get_accounts
oauth.get_new_token
The client object creates an instance of a Basecamp OAuth client and provides methods to get an array of todo lists and an array of projects associated with the users token
client = Basecamp::Client.new(:token => <the users token>, :account_id => <the basecamp account to access>)
client.todolists
client.projects
- Fork it ( http://github.com/dphaener/basecamp/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request