Class: Fizzy::Services::ReactionsService
- Inherits:
-
BaseService
- Object
- BaseService
- Fizzy::Services::ReactionsService
- Defined in:
- lib/fizzy/generated/services/reactions_service.rb
Overview
Service for Reactions operations
Instance Method Summary collapse
-
#create_for_card(account_id:, card_number:, content:) ⇒ Hash
create_for_card operation.
-
#create_for_comment(account_id:, card_number:, comment_id:, content:) ⇒ Hash
create_for_comment operation.
-
#delete_for_card(account_id:, card_number:, reaction_id:) ⇒ void
delete_for_card operation.
-
#delete_for_comment(account_id:, card_number:, comment_id:, reaction_id:) ⇒ void
delete_for_comment operation.
-
#list_for_card(account_id:, card_number:) ⇒ Hash
list_for_card operation.
-
#list_for_comment(account_id:, card_number:, comment_id:) ⇒ Hash
list_for_comment operation.
Methods inherited from BaseService
Constructor Details
This class inherits a constructor from Fizzy::Services::BaseService
Instance Method Details
#create_for_card(account_id:, card_number:, content:) ⇒ Hash
create_for_card operation
61 62 63 64 65 |
# File 'lib/fizzy/generated/services/reactions_service.rb', line 61 def create_for_card(account_id:, card_number:, content:) with_operation(service: "reactions", operation: "CreateCardReaction", is_mutation: true, resource_id: card_number) do http_post("/#{account_id}/cards/#{card_number}/reactions.json", body: compact_params(content: content)).json end end |
#create_for_comment(account_id:, card_number:, comment_id:, content:) ⇒ Hash
create_for_comment operation
27 28 29 30 31 |
# File 'lib/fizzy/generated/services/reactions_service.rb', line 27 def create_for_comment(account_id:, card_number:, comment_id:, content:) with_operation(service: "reactions", operation: "CreateCommentReaction", is_mutation: true, resource_id: comment_id) do http_post("/#{account_id}/cards/#{card_number}/comments/#{comment_id}/reactions.json", body: compact_params(content: content)).json end end |
#delete_for_card(account_id:, card_number:, reaction_id:) ⇒ void
This method returns an undefined value.
delete_for_card operation
72 73 74 75 76 77 |
# File 'lib/fizzy/generated/services/reactions_service.rb', line 72 def delete_for_card(account_id:, card_number:, reaction_id:) with_operation(service: "reactions", operation: "DeleteCardReaction", is_mutation: true, resource_id: reaction_id) do http_delete("/#{account_id}/cards/#{card_number}/reactions/#{reaction_id}") nil end end |
#delete_for_comment(account_id:, card_number:, comment_id:, reaction_id:) ⇒ void
This method returns an undefined value.
delete_for_comment operation
39 40 41 42 43 44 |
# File 'lib/fizzy/generated/services/reactions_service.rb', line 39 def delete_for_comment(account_id:, card_number:, comment_id:, reaction_id:) with_operation(service: "reactions", operation: "DeleteCommentReaction", is_mutation: true, resource_id: reaction_id) do http_delete("/#{account_id}/cards/#{card_number}/comments/#{comment_id}/reactions/#{reaction_id}") nil end end |
#list_for_card(account_id:, card_number:) ⇒ Hash
list_for_card operation
50 51 52 53 54 |
# File 'lib/fizzy/generated/services/reactions_service.rb', line 50 def list_for_card(account_id:, card_number:) with_operation(service: "reactions", operation: "ListCardReactions", is_mutation: false, resource_id: card_number) do http_get("/#{account_id}/cards/#{card_number}/reactions.json").json end end |
#list_for_comment(account_id:, card_number:, comment_id:) ⇒ Hash
list_for_comment operation
15 16 17 18 19 |
# File 'lib/fizzy/generated/services/reactions_service.rb', line 15 def list_for_comment(account_id:, card_number:, comment_id:) with_operation(service: "reactions", operation: "ListCommentReactions", is_mutation: false, resource_id: comment_id) do http_get("/#{account_id}/cards/#{card_number}/comments/#{comment_id}/reactions.json").json end end |