Skip to content

kanfet/smspilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMSPilot

Wrapper for smspilot.ru API 2.х

Installation

It is while only via git. Add to your Gemfile

gem "sms_pilot", :git => "https://github.com/kanfet/smspilot.git"

And execute

bundle install

Usage

Client creation

client = SmsPilot.new(api_key)

SMS sending

  • First way
result = client.sms(text, to, from, id)

text and to only required (both must be a string)

  • Second way
result = client.sms({text: "text message", to: "79999999999", from: "Sender", id: 123})
  • Last way (mass sending)
result = client.sms([
   {to: "79999999999", text: "First message"},
   {to: "79999999998", text: "Second message"},
   {to: "79999999997", text: "Third message"}
])

SMS status checking

  • by id(s)
result = client.check(server_id1, server_id2, server_id3)
  • by packet
result = client.check_packet(packet_id)

Balance

result = client.balance

User info

result = client.user_info

Inbound messages

result = client.inbound

About

Wrapper for smspilot.ru API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages