Module: CommandTower::Messaging::Pushover::Transport

Defined in:
app/services/command_tower/messaging/pushover/transport.rb

Overview

Selects Pushover provider transport from config. Provider ops only — verification and delivery. Does not query endpoints, preferences, or create DeliveryAttempts.

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.adapterObject



13
14
15
# File 'app/services/command_tower/messaging/pushover/transport.rb', line 13

def adapter
  @adapter ||= build_adapter
end

Class Method Details

.reset_adapter!Object



17
18
19
# File 'app/services/command_tower/messaging/pushover/transport.rb', line 17

def reset_adapter!
  @adapter = nil
end

.send_message!(user_key:, application_token:, title:, message:) ⇒ Object



34
35
36
37
38
39
40
41
# File 'app/services/command_tower/messaging/pushover/transport.rb', line 34

def send_message!(user_key:, application_token:, title:, message:)
  adapter.send_message!(
    user_key:,
    application_token:,
    title:,
    message:,
  )
end

.send_test_notification!(user_key:, application_token:, title:, message:) ⇒ Object



25
26
27
28
29
30
31
32
# File 'app/services/command_tower/messaging/pushover/transport.rb', line 25

def send_test_notification!(user_key:, application_token:, title:, message:)
  adapter.send_test_notification!(
    user_key:,
    application_token:,
    title:,
    message:,
  )
end

.validate_user!(user_key:, application_token:) ⇒ Object



21
22
23
# File 'app/services/command_tower/messaging/pushover/transport.rb', line 21

def validate_user!(user_key:, application_token:)
  adapter.validate_user!(user_key:, application_token:)
end