module Basecamp3

A concern for bucketable models

A concern for commentable models

A concern for creatorable models

A concern for parentable models

A concern for recordingable models

Constants

HOST
VERSION

Public Class Methods

connect(account_id, access_token) click to toggle source

Establishes a connection with basecamp

@param [Integer] account_id the id of your basecamp account @param [Integer] access_token the oauth2 access token

# File lib/basecamp3.rb, line 45
def connect(account_id, access_token)
  @account_id = account_id
  @access_token = access_token
  @uri = URI.parse("#{HOST}/#{@account_id}")

  @request = Basecamp3::Request.new(@access_token, @uri)
end
request() click to toggle source

Returns the request object

@return [Basecamp3::Request] @raise [StandardError] raises an error if a connection is not established

# File lib/basecamp3.rb, line 57
def request
  @request || raise('You have to call Basecamp.connect method first')
end