Coder Social home page Coder Social logo

lukeredpath / clickatell Goto Github PK

View Code? Open in Web Editor NEW
139.0 139.0 60.0 286 KB

NO LONGER SUPPORTED - Ruby interface to the Clickatell SMS Gateway API

Home Page: http://clickatell.rubyforge.org

License: MIT License

Ruby 47.60% JavaScript 34.54% CSS 16.35% HTML 1.51%

clickatell's Introduction

Hi, I'm Luke ๐Ÿ‘‹๐Ÿป

I'm an iOS and Ruby developer from Colchester, UK. I'm an iOS engineer at Community.com where I also lead the mobile guild.

You can view more about my experience and skills on my website and on my LinkedIn profile.

clickatell's People

Contributors

alhafoudh avatar dweinand avatar eimermusic avatar johnpg avatar jsierles2 avatar lukeredpath avatar tomtoday avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clickatell's Issues

ENV['HOME'] isn't everywhere

Not all shells and all environments sets ENV[HOME], line 90 of options.rb has:

      config_file = File.open(File.join(ENV['HOME'], '.clickatell'))

which raises an exception and dies without sending sms if HOME isn't set

send_message limits options

Why can't I add to the options unicode = 1. Looks like the api limits options to only allow :from, :mo, :callback. Is there a way around this that I do not see?

Authentication errors cause sms tool to stack trace

Just getting started and testing with the command line tool, sms

I've created the ~/.clickatell file but for one reason or another I'm getting an authentication error, however sms just chokes and throws a stack trace.

I'll have a look into this and patch it myself if possible, should just need a rescue block for auth fail.

The other thing notable is the credentials I'm using are correct (well they're what I use to connect to clickatell.com + the api_id - anyway, just logging the issue, I'll take a look in the morning.

Ruby 1.9 compatibility

There appears to be some 1.9 compatibility issues that require investigation; error from the --version command:

Ruby Clickatell SMS Utility 0.7.1
[halim@myhost bin]$ ./sms -b
/home/halim/.gem/ruby/1.9.1/gems/clickatell-0.7.1/lib/clickatell/api/command_executor.rb:34:in execute': undefined methodfirst' for #<Net::HTTPOK 200 OK readbody=true> (NoMethodError)
from /home/halim/.gem/ruby/1.9.1/gems/clickatell-0.7.1/lib/clickatell/api.rb:115:in execute_command' from /home/halim/.gem/ruby/1.9.1/gems/clickatell-0.7.1/lib/clickatell/api.rb:50:inauthenticate'
from /home/halim/.gem/ruby/1.9.1/gems/clickatell-0.7.1/lib/clickatell/api.rb:13:in authenticate' from /home/halim/.gem/ruby/1.9.1/gems/clickatell-0.7.1/bin/sms:20:in<top (required)>'
from ./sms:19:in load' from ./sms:19:in

'

FYI on concatenated messages

I saw the commits regarding the concat parameter. AFAIK this value indicates the maximum length allowed, not the actual length of the current message. The reason is that the parameter is there to allow you, as the user of Clickatell, to set a limit compatible with the country you are sending to. Some countries (at least via Clickatell) only support 1,2 or 3 parts.

I am not sure setting it automatically is the best option. I'd prefer it if a user set :concat took priority and the automatic one was a fallback.

I also wanted to note that messages with more than 160 characters are split but that is not the whole truth.
A character is a GSM character. I.E. some rarer characters are "extended" and count as two.
When a message is 161 characters long it is not split as 160 + 1 but rather 153 or 152 + the remaining chars in order to leave room for the concatenation data in the remaining bytes. The split will vary depending on the number of extended characters in the message. That is why we love Clickatell for taking care of the splitting internally.... unlike some aggregators.

If Github can handle them here are the extended ones:
โ‚ฌ|^{}[]~\

Yes, a real mess. Learning and figuring this stuff out was not as much fun as going to a sadistic dentist. :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.