Wrapper for smspilot.ru API 2.х
It is while only via git. Add to your Gemfile
gem "sms_pilot", :git => "https://github.com/kanfet/smspilot.git"
And execute
bundle install
client = SmsPilot.new(api_key)
- 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"}
])
- by id(s)
result = client.check(server_id1, server_id2, server_id3)
- by packet
result = client.check_packet(packet_id)
result = client.balance
result = client.user_info
result = client.inbound