Class: Basecamp::Services::MyNotificationsService
- Inherits:
-
BaseService
- Object
- BaseService
- Basecamp::Services::MyNotificationsService
- Defined in:
- lib/basecamp/generated/services/my_notifications_service.rb
Overview
Service for MyNotifications operations
Instance Method Summary collapse
-
#get_my_notifications(page: nil) ⇒ Hash
Get the current user's notification inbox (the "Hey!" menu).
-
#mark_as_read(readables:) ⇒ void
Mark specified items as read.
Constructor Details
This class inherits a constructor from Basecamp::Services::BaseService
Instance Method Details
#get_my_notifications(page: nil) ⇒ Hash
Get the current user's notification inbox (the "Hey!" menu).
13 14 15 16 17 |
# File 'lib/basecamp/generated/services/my_notifications_service.rb', line 13 def get_my_notifications(page: nil) with_operation(service: "mynotifications", operation: "get_my_notifications", is_mutation: false) do http_get("/my/readings.json", params: compact_query_params(page: page)).json end end |
#mark_as_read(readables:) ⇒ void
This method returns an undefined value.
Mark specified items as read
22 23 24 25 26 27 |
# File 'lib/basecamp/generated/services/my_notifications_service.rb', line 22 def mark_as_read(readables:) with_operation(service: "mynotifications", operation: "mark_as_read", is_mutation: true) do http_put("/my/unreads.json", body: compact_params(readables: readables)) nil end end |