Socket
Book a DemoInstallSign in
Socket

sms_manager

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sms_manager

bundlerRubygems
Version
0.3.3
Version published
Maintainers
1
Created
Source

SmsManager

Gem Version Build Status Dependency Status Code Climate Coverage Status

A Ruby SDK for smsmanager.cz - Czech SMS provider.

Installation

gem install sms_manager

Or add to Gemfile:

gem 'sms_manager'

Usage

First you need to setup your credentials:

SmsManager.configure do |config|
  config.username = YOUR_USERNAME
  config.hashed_password = HASHED_PASSWORD
end

Create the password hash with SHA-1 in console and then put the string into the configuration block:

require 'digest/sha1'
Digest::SHA1.hexdigest 'password'

That's all. Now you can send SMS messages.

SmsManager.send number: '+420123456789', message: 'Hello!'

You can pass all the parameters available at SmsManager API. These additional parameters will be appended to the request:

SmsManager.send number: '+420123456789', message: 'Hello!', gateway: 'lowcost', time: '2013-01-01T23:59:59'

If the service fails an exception is raised:

begin
  SmsManager.send number: '+420123456789', message: 'Hello!'
rescue SmsManager::Error => e
  puts e.message # => Neplatný parametr gateway
end

Copyright (c) 2013 David Hrachovy See LICENSE for details.

FAQs

Package last updated on 19 May 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.