Skip to content

Commit

Permalink
Add demo script
Browse files Browse the repository at this point in the history
  • Loading branch information
envisean committed Feb 12, 2016
1 parent 756a964 commit 53b7a37
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions demo_send.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Require the Flowroute Messaging SDK
require 'flowroute_messaging'

# Instantiate the controller
ctl = FlowrouteMessaging::MessagesController.new('YOUR_API_KEY', 'YOUR_API_SECRET_KEY')
# Create the message object
msg = FlowrouteMessaging::Message.new(to='TO_PHONE_NUMBER', from='FROM_PHONE_NUMBER', content='YOUR_MESSAGE_GOES_IN_HERE')

# Use the controller to send the message
ctl.create_message(msg)
5 changes: 5 additions & 0 deletions lib/flowroute_messaging/models/message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ class Message
# @return [String]
attr_accessor :content

def initialize(to, from, content)
@to = to
@from = from
@content = content
end

def method_missing (method_name)
puts "there's no method called '#{method_name}'"
Expand Down

0 comments on commit 53b7a37

Please sign in to comment.