Ruby gem
A Ruby gem for our SMS API is available to browse and download on Github. You can also install it directly from rubygems.org, by adding the “clockworksms” gem to your Gemfile.
1
2
3
4
5
6
7
8
9
10
11
12
require 'clockwork'
api = Clockwork::API.new( 'API_KEY_GOES_HERE' )
message = api.messages.build( :to => '447000000000', :content => 'Hello World' )
response = message.deliver
if response.success
puts response.message_id
else
puts response.error_code
puts response.error_description
end
Full documentation can be found in the readme file. If you have any questions get in touch.