Permalink
Browse files

modified URL

  • Loading branch information...
1 parent a1b3ce1 commit b3c38314976712e86224c54177cfe81b71be464d @chrismatthieu committed Jun 15, 2011
Showing with 18 additions and 18 deletions.
  1. +18 −18 smsbar.rb
View
@@ -3,7 +3,7 @@
require "smsified"
get '/' do
- '<html><head><style type="text/css"> body { background: url("/speech-bubble.jpg"); background-repeat:no-repeat; background-color: #124D9D; margin: 100 100px; font-size:large; }</style></head><body><h1>Welcome to the SMS Bar!</h1><p>You can now send SMS messages from your web browser\'s address bar using the following format:</p><p>http://smsbar.heroku.com/to_mobile_number/encoded+message</p><br/><p>Powered by <br/><a href="http://smsified.com"><img src="/header-logo.png"></a></p></body></html>'
+ '<html><head><style type="text/css"> body { background: url("/speech-bubble.jpg"); background-repeat:no-repeat; background-color: #124D9D; margin: 100 100px; font-size:large; }</style></head><body><h1>Welcome to the SMS Bar!</h1><p>You can now send SMS messages from your web browser\'s address bar using the following format:</p><p>http://smsbar.heroku.com/username/password/smsified_number/to_mobile_number/encoded+message</p><br/><p>Powered by <br/><a href="http://smsified.com"><img src="/header-logo.png"></a></p></body></html>'
end
get '/:username/:password/:from/:to/:message' do
@@ -16,27 +16,27 @@
:message => params[:message] + " via SMSified.com",
:sender_address => params[:from]
- "Yay! Message sent to #{params[:to]}"
+'<html><head><style type="text/css"> body { background: url("/speech-bubble.jpg"); background-repeat:no-repeat; background-color: #124D9D; margin: 100 100px; font-size:large; }</style></head><body><h1>Yay! Message sent to ' + params[:to] + '</h1><p><a href="\">Go back</a></p><br/><p>Powered by <br/><a href="http://smsified.com"><img src="/header-logo.png"></a></p></body></html>'
rescue => error
"Sad panda error message goes here - your SMS did not get delivered :("
end
end
-get '/:to/:message' do
- begin
-
- oneapi = Smsified::OneAPI.new :username => 'smsbar',
- :password => 'smsbar1'
-
- oneapi.send_sms :address => params[:to],
- :message => params[:message] + " via SMSified.com",
- :sender_address => '4433058582'
-
- '<html><head><style type="text/css"> body { background: url("/speech-bubble.jpg"); background-repeat:no-repeat; background-color: #124D9D; margin: 100 100px; font-size:large; }</style></head><body><h1>Yay! Message sent to ' + params[:to] + '</h1><p><a href="\">Go back</a></p><br/><p>Powered by <br/><a href="http://smsified.com"><img src="/header-logo.png"></a></p></body></html>'
-
- rescue => error
- "Sad panda error message goes here - your SMS did not get delivered :("
- end
-end
+# get '/:to/:message' do
+# begin
+#
+# oneapi = Smsified::OneAPI.new :username => 'smsbar',
+# :password => 'secret'
+#
+# oneapi.send_sms :address => params[:to],
+# :message => params[:message] + " via SMSified.com",
+# :sender_address => '4433058582'
+#
+# '<html><head><style type="text/css"> body { background: url("/speech-bubble.jpg"); background-repeat:no-repeat; background-color: #124D9D; margin: 100 100px; font-size:large; }</style></head><body><h1>Yay! Message sent to ' + params[:to] + '</h1><p><a href="\">Go back</a></p><br/><p>Powered by <br/><a href="http://smsified.com"><img src="/header-logo.png"></a></p></body></html>'
+#
+# rescue => error
+# "Sad panda error message goes here - your SMS did not get delivered :("
+# end
+# end

0 comments on commit b3c3831

Please sign in to comment.