Class: Basecampx::Event

Inherits:
Resource show all
Defined in:
lib/basecampx/resources/event.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Resource

#delete, #initialize, parse, #save, #update_attributes

Methods included from Relations

#has_many, #has_one, #mount

Constructor Details

This class inherits a constructor from Basecampx::Resource

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



4
5
6
# File 'lib/basecampx/resources/event.rb', line 4

def created_at
  @created_at
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/basecampx/resources/event.rb', line 4

def id
  @id
end

#summaryObject

Returns the value of attribute summary.



4
5
6
# File 'lib/basecampx/resources/event.rb', line 4

def summary
  @summary
end

#updated_atObject

Returns the value of attribute updated_at.



4
5
6
# File 'lib/basecampx/resources/event.rb', line 4

def updated_at
  @updated_at
end

#urlObject

Returns the value of attribute url.



4
5
6
# File 'lib/basecampx/resources/event.rb', line 4

def url
  @url
end

Class Method Details

.all(since = 1.day.ago) ⇒ Object



9
10
11
# File 'lib/basecampx/resources/event.rb', line 9

def self.all since=1.day.ago
  Event.parse Basecampx.request "events.json?since=#{since.to_time.iso8601}"
end