
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
mnc smsBox® v6.4 -- HTTP XML API client
Add this line to your application's Gemfile:
gem 'sms_box'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sms_box
Load and SMSBox
require 'sms_box'
client = SMSBox.client 'http://pro.smsbox.ch:8047/Pro/sms/xml',
{
:username => 'myuser',
:password => 'mypass'
}
Client can be configured within a block
client = SMSBox.client 'http://pro.smsbox.ch:8047/Pro/sms/xml' do |c|
c.username = 'myuser'
c.password = 'mypass'
end
To send a request, a Request object needs to be instantiated and passed
to client.request
request = SMSBox::WebsendRequest.new.tap do |r|
r.service = 'TEST'
r.text = 'This is a test message.'
r.receivers = [
'+41790000001',
'+41790000002',
'+41790000003',
]
end
res = client.request request
The bang method request!
can be used to automatically raise an
SMSBox::RequestException
when request failed.
res = client.request! request # raises SMSBox::RequestException when response.error? == true
The status of the request can be checked on the response object
res.success?
# or
res.error?
# The error type is stored as string in res.error
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that sms_box demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.