Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

smsway_api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smsway_api

  • 0.1.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

smsway_api Build Status Gem Version Dependency Status Code Climate

Ruby wrapper for smsway.ru xml api

Installation

# Gemfile
gem 'smsway_api'

or just

$ gem install smsway_api

Config

Parameters for smsway_api should be placed in SmswayApi.configure block. Put smsway_api.rb into config/initializers directory of your rails application or just run:

 rails generate smsway_api:install

Example of config file:

SmswayApi.configure do |config|
  config.login = '123'
  config.password = 'AbCdE654'


  config.default_sender = 'smsway'
end

Usage

Now implemented only two methods of smsway api: send message and get balance. You can send sms, flash-sms, wap-push and vcard.

Simple sending message: SmswayApi::API.send_message('test message', phone). Building and sending VCard:

vcard = SmswayApi::Message::Vcard.new({
  name: 'Steave Jobs',
  email: 'jobs@apple.com',
  phone: {
    work: '1-800-275-2273'
  }
})
vcard.add_recipient('1-800-694-7466')
vcard.add_recipient('1-800-800-2775')
vcard.sender = 'apple'
SmswayApi::API.send_message(vcard)

This example will send vcard to two recipients. Field 'from' will be 'apple'.

Get balance:

SmswayApi::API.balance

FAQs

Package last updated on 24 Nov 2014

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc