Class: Ruboty::Handlers::GoogleCalendar
- Inherits:
-
Base
- Object
- Base
- Ruboty::Handlers::GoogleCalendar
show all
- Defined in:
- lib/ruboty/handlers/google_calendar.rb
Defined Under Namespace
Classes: Client, ItemView
Constant Summary
collapse
- DEFAULT_CALENDAR_ID =
"primary"
Instance Method Summary
collapse
Instance Method Details
#list_events(message) ⇒ Object
25
26
27
28
29
30
|
# File 'lib/ruboty/handlers/google_calendar.rb', line 25
def list_events(message)
text = client.list_events(calendar_id: calendar_id).items.map do |item|
ItemView.new(item)
end.join("\n")
message.reply(text, code: true)
end
|