Class: NotifyMakersCom::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/notify_makers_com/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(api_key) ⇒ Client

Returns a new instance of Client.



7
8
9
10
11
12
# File 'lib/notify_makers_com/client.rb', line 7

def initialize(api_key)
  @site    = 'https://notifymakers.com'
  @api_key = api_key

  setup_connection
end

Instance Method Details

#create_message(provider, recipient, message) ⇒ Object



14
15
16
# File 'lib/notify_makers_com/client.rb', line 14

def create_message(provider, recipient, message)
  NotifyMakersCom::Message.create({ provider_id: provider, message: { recipient: recipient, message: message } })
end

#providersObject



18
19
20
# File 'lib/notify_makers_com/client.rb', line 18

def providers
  NotifyMakersCom::Provider.all
end