bobes / textmagic Goto Github PK
View Code? Open in Web Editor NEWRuby interface to the TextMagic's Bulk SMS Gateway
Home Page: http://tuzinsky.com/textmagic/
License: MIT License
Ruby interface to the TextMagic's Bulk SMS Gateway
Home Page: http://tuzinsky.com/textmagic/
License: MIT License
send
has a special meaning in Ruby, and shouldn't be used for the name of the method.
It's liable to cause unexpected side-effects. For instance, if you were to try and mock out the send
method as part of your tests, you'll run into issues very quickly.
I realize that it's a pain to rename such a fundamental part of this API, but using send
as a method name is hugely discouraged for a reason.
My suggestion would be to 1) introduce a new method name (e.g. send_message
), and 2) deprecate the send
method by printing a warning anytime uses it. That way, you can wait for gem users to become aware of the issue, and eventually remove it entirely in a future release.
Hi
We use your plugin and at the end of July it suddenly stopped authorising with TextMagic and we keep getting the following exception:
/Library/Ruby/Gems/2.0.0/gems/textmagic-0.5.0/lib/textmagic/executor.rb:36:in `execute`: Invalid username & password combination (TextMagic::API::Error)
from /Library/Ruby/Gems/2.0.0/gems/textmagic-0.5.0/lib/textmagic/api.rb:103:in `send'
from ./text-magic.rb:6:in `<main>'
Our username and password in our script are definitely correct so we thought it was a problem with TextMagic but on contacting them they said everything is fine. We then tried using Java to connect with the same username and password which worked and sent a message to our phone.
After a little debugging it seems in executor.rb
the post
:
response = self.post("/api", :body => options, :format => :json)
doesn't seem to be working for us, but when we replace it with
response = self.get("<with full url and url parameters")
it then works and we receive a text.
Any help would be most appreciated.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.