Basecamper
Basecamper is a Ruby wrapper to the 37 Signals Basecamp API
Installation
Simply add the gem to your Gemfile
gem 'basecamper'Configuration
Add authentication configurations:
Basecamper.configure do |config|
config.token = '123abc'
config.domain = 'dummy.basecamphq.com'
endBasecamper also enables one to authenticate with one's username and password:
Basecamper.configure do |config|
config.user = '123abc'
config.password = 'secret'
endAuthentication using OAuth is also supported:
Basecamper.configure do |config|
config.use_oauth = true
config.token = 'abc123'
endUse SSL?
Basecamper.configure {|c| c.use_ssl = true }Usage
View account info:
Basecamper.accountReturn current user:
Basecamper::Person.meBasic operations:
Basecamper::Project.all
returns: [#<Basecamper::Project:0x266e458 @attributes={"company"=>..}>]
Basecamper::Project.first
returns: #<Basecamper::Project:0x266e458 @attributes={"company"=>..}>Advanced queries:
Basecamper::TodoList.all(:params => { :project_id => 1234 })
Basecamper::TodoList.find(:all, :params => { :project_id => 1234, :responsible_party => 9124 })Child assocations:
project = Basecamper::Project.find(123)
project.messagesParent associations:
message = Basecamper::Message.find(123)
message.projectCredits
- Carlos Ramirez III (carlosramireziii)