Class: Basecamp::Services::BoostsService
- Inherits:
-
BaseService
- Object
- BaseService
- Basecamp::Services::BoostsService
- Defined in:
- lib/basecamp/generated/services/boosts_service.rb
Overview
Service for Boosts operations
Instance Method Summary collapse
-
#create_event_boost(recording_id:, event_id:, content:) ⇒ Hash
Create a boost on a specific event within a recording.
-
#create_recording_boost(recording_id:, content:) ⇒ Hash
Create a boost on a recording.
-
#delete_boost(boost_id:) ⇒ void
Delete a boost.
-
#get_boost(boost_id:) ⇒ Hash
Get a single boost.
-
#list_event_boosts(recording_id:, event_id:, page: nil, max_items: nil) ⇒ ListEnumerator<Hash>
List boosts on a specific event within a recording.
-
#list_recording_boosts(recording_id:, page: nil, max_items: nil) ⇒ ListEnumerator<Hash>
List boosts on a recording.
Constructor Details
This class inherits a constructor from Basecamp::Services::BaseService
Instance Method Details
#create_event_boost(recording_id:, event_id:, content:) ⇒ Hash
Create a boost on a specific event within a recording
69 70 71 72 73 |
# File 'lib/basecamp/generated/services/boosts_service.rb', line 69 def create_event_boost(recording_id:, event_id:, content:) with_operation(service: "boosts", operation: "create_event_boost", is_mutation: true, resource_id: event_id) do http_post("/recordings/#{recording_id}/events/#{event_id}/boosts.json", body: compact_params(content: content)).json end end |
#create_recording_boost(recording_id:, content:) ⇒ Hash
Create a boost on a recording
45 46 47 48 49 |
# File 'lib/basecamp/generated/services/boosts_service.rb', line 45 def create_recording_boost(recording_id:, content:) with_operation(service: "boosts", operation: "create_recording_boost", is_mutation: true, resource_id: recording_id) do http_post("/recordings/#{recording_id}/boosts.json", body: compact_params(content: content)).json end end |
#delete_boost(boost_id:) ⇒ void
This method returns an undefined value.
Delete a boost
22 23 24 25 26 27 |
# File 'lib/basecamp/generated/services/boosts_service.rb', line 22 def delete_boost(boost_id:) with_operation(service: "boosts", operation: "delete_boost", is_mutation: true, resource_id: boost_id) do http_delete("/boosts/#{boost_id}") nil end end |
#get_boost(boost_id:) ⇒ Hash
Get a single boost
13 14 15 16 17 |
# File 'lib/basecamp/generated/services/boosts_service.rb', line 13 def get_boost(boost_id:) with_operation(service: "boosts", operation: "get_boost", is_mutation: false, resource_id: boost_id) do http_get("/boosts/#{boost_id}", operation: "GetBoost").json end end |
#list_event_boosts(recording_id:, event_id:, page: nil, max_items: nil) ⇒ ListEnumerator<Hash>
List boosts on a specific event within a recording
57 58 59 60 61 62 |
# File 'lib/basecamp/generated/services/boosts_service.rb', line 57 def list_event_boosts(recording_id:, event_id:, page: nil, max_items: nil) wrap_paginated(service: "boosts", operation: "list_event_boosts", is_mutation: false, resource_id: event_id) do params = compact_query_params(page: page) paginate("/recordings/#{recording_id}/events/#{event_id}/boosts.json", params: params, operation: "ListEventBoosts", max_items: max_items) end end |
#list_recording_boosts(recording_id:, page: nil, max_items: nil) ⇒ ListEnumerator<Hash>
List boosts on a recording
34 35 36 37 38 39 |
# File 'lib/basecamp/generated/services/boosts_service.rb', line 34 def list_recording_boosts(recording_id:, page: nil, max_items: nil) wrap_paginated(service: "boosts", operation: "list_recording_boosts", is_mutation: false, resource_id: recording_id) do params = compact_query_params(page: page) paginate("/recordings/#{recording_id}/boosts.json", params: params, operation: "ListRecordingBoosts", max_items: max_items) end end |