Class: Brocktail::API::Acts

Inherits:
Base
  • Object
show all
Includes:
Behavior::Crud
Defined in:
lib/brocktail/api/acts.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#credentials, #request

Instance Method Summary collapse

Methods included from Behavior::Crud

#find

Methods inherited from Base

#acts, #events

Constructor Details

#initialize(credentials, event_id) ⇒ Acts

Returns a new instance of Acts.



10
11
12
13
# File 'lib/brocktail/api/acts.rb', line 10

def initialize(credentials, event_id)
  @event_id = event_id
  super(credentials)
end

Instance Attribute Details

#event_idObject (readonly)

Returns the value of attribute event_id.



8
9
10
# File 'lib/brocktail/api/acts.rb', line 8

def event_id
  @event_id
end

Instance Method Details

#allObject



15
16
17
18
# File 'lib/brocktail/api/acts.rb', line 15

def all
  response = request(:get, credentials, "#{Brocktail::Event.api_path}/#{@event_id}/#{api_model.api_path}")
  api_model.parse(response.body)
end