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_bubble_ups(page: nil) ⇒ Enumerator<Hash>
Get the current user's current and scheduled bubble-ups (paginated, 50 per page).
-
#get_my_notifications(page: nil, limit_bubble_ups: 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_bubble_ups(page: nil) ⇒ Enumerator<Hash>
Get the current user's current and scheduled bubble-ups (paginated, 50 per page).
26 27 28 29 30 31 |
# File 'lib/basecamp/generated/services/my_notifications_service.rb', line 26 def get_bubble_ups(page: nil) wrap_paginated(service: "mynotifications", operation: "get_bubble_ups", is_mutation: false) do params = compact_query_params(page: page) paginate("/my/readings/bubble_ups.json", params: params, operation: "GetBubbleUps") end end |
#get_my_notifications(page: nil, limit_bubble_ups: nil) ⇒ Hash
Get the current user's notification inbox (the "Hey!" menu).
17 18 19 20 21 |
# File 'lib/basecamp/generated/services/my_notifications_service.rb', line 17 def get_my_notifications(page: nil, limit_bubble_ups: nil) with_operation(service: "mynotifications", operation: "get_my_notifications", is_mutation: false) do http_get("/my/readings.json", params: compact_query_params(page: page, limit_bubble_ups: limit_bubble_ups), operation: "GetMyNotifications").json end end |
#mark_as_read(readables:) ⇒ void
This method returns an undefined value.
Mark specified items as read
36 37 38 39 40 41 |
# File 'lib/basecamp/generated/services/my_notifications_service.rb', line 36 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 |