camper

Camper is a Ruby wrapper for the Basecamp 3 API.
You can check out the gem documentation at https://www.rubydoc.org/gems/camper
Installation
Add this line to your application's Gemfile:
gem 'camper'And then execute:
$ bundleOr install it yourself as:
$ gem install camperStatus of API endpoints
The up-to-date list of Basecamp API endpoints can be found at here.
Currently, Camper supports the following endpoints:
- Comments: Implementation at comments.rb (Partial)
- Messages: Implementation at messages.rb (Partial)
- People: Implementation at people.rb (Complete)
- Projects: Implementation at projects.rb (Complete)
- To-do list: Implementation at todolists.rb (Almost complete, only missing todolist trashing)
- To-dos: Implementation at todos.rb (Almost complete, only missing todo trashing)
Usage
Configuration
Getting a client and configuring it:
require 'camper'
client = Camper.client
client.configure do |config|
config.client_id = 'client_id'
config.client_secret = 'client_secret'
config.account_number = 'account_number'
config.refresh_token = 'refresh_token'
config.access_token = 'access_token'
endAlternatively, it is possible to invoke the top-level #configure method to get a client:
require 'camper'
client = Camper.configure do |config|
config.client_id = 'client_id'
config.client_secret = 'client_secret'
config.account_number = 'account_number'
config.refresh_token = 'refresh_token'
config.access_token = 'access_token'
endAlso, the client can read directly the following environment variables:
BASECAMP_CLIENT_IDBASECAMP_CLIENT_SECRETBASECAMP_ACCOUNT_NUMBERBASECAMP_REFRESH_TOKENBASECAMP_ACCESS_TOKEN
then the code would look like:
require 'camper'
client = Camper.clientExamples
Example getting list of TODOs:
require 'camper'
client = Camper.configure do |config|
config.client_id = ENV['BASECAMP_CLIENT_ID']
config.client_secret = ENV['BASECAMP_CLIENT_SECRET']
config.account_number = ENV['BASECAMP_ACCOUNT_NUMBER']
config.refresh_token = ENV['BASECAMP_REFRESH_TOKEN']
config.access_token = ENV['BASECAMP_ACCESS_TOKEN']
end
# gets a paginated response
projects = client.projects
# iterate all projects
projects.auto_paginate do |p|
puts "Project: #{p.inspect}"
puts "Todo set: #{p.todoset.inspect}"
todoset = client.todoset(p)
# iterate over the first 5 todo lists
client.todolists(todoset).auto_paginate(5) do |list|
puts "Todolist: #{list.title}"
client.todos(list).auto_paginate do |todo|
puts todo.inspect
end
end
endFor more examples, check out the examples folder
Contributing
Check out the Contributing page.
Changelog
For inspecting the changes and tag releases, check the Changelog page
Appreciation
The gem code structure and documentation is based on the awesome NARKOZ/gitlab gem
License
Checkout the LICENSE for details

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
