Class: NotifyMakersCom::Client
- Inherits:
-
Object
- Object
- NotifyMakersCom::Client
- Defined in:
- lib/notify_makers_com/client.rb
Instance Method Summary collapse
- #create_message(provider, recipient, message) ⇒ Object
-
#initialize(api_key) ⇒ Client
constructor
A new instance of Client.
- #providers ⇒ Object
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 (provider, recipient, ) NotifyMakersCom::Message.create({ provider_id: provider, message: { recipient: recipient, message: } }) end |
#providers ⇒ Object
18 19 20 |
# File 'lib/notify_makers_com/client.rb', line 18 def providers NotifyMakersCom::Provider.all end |