Class: Ribose::Calendar
- Includes:
- Actions::All, Actions::Create, Actions::Delete, Actions::Fetch
- Defined in:
- lib/ribose/calendar.rb
Class Method Summary collapse
-
.fetch(calendar_ids, start: Date.today, length: 7, **others) ⇒ Sawyer::Resource
Fetch calendar events.
Methods included from Actions::Delete
Methods included from Actions::Base
Methods included from Actions::Create
Methods included from Actions::Fetch
Methods included from Actions::All
Methods inherited from Base
Methods included from ResourceHelper
#resource_id, #resource_key, #resource_path, #resources
Constructor Details
This class inherits a constructor from Ribose::Base
Class Method Details
.fetch(calendar_ids, start: Date.today, length: 7, **others) ⇒ Sawyer::Resource
Fetch calendar events
17 18 19 20 21 22 23 24 25 |
# File 'lib/ribose/calendar.rb', line 17 def self.fetch(calendar_ids, start: Date.today, length: 7, **others) query = { length: length, cal_ids: Ribose.encode_ids(calendar_ids), start: start.to_time.to_i / (60 * 60 * 24), } super(nil, query: others.merge(query)) end |