
Security News
Oxlint Introduces Type-Aware Linting Preview
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Welcome! This Ruby gem helps You to send SMS using API https://sms-fly.com/
TODO:
Add this line to your application's Gemfile:
gem 'smsfly', '~> 0.4.6'
And then execute:
$ bundle
Or install it yourself as:
$ gem install smsfly
Then run:
$ rails g smsfly:config
which will generate default settings files:
config/initializers/smsfly.rb
Then configurate smsfly.rb file:
Smsfly.configuration do |config|
config.login = 'You login' # Like this 380675807873
config.password = 'You password' # Like this ZhHtgj4Z
end
Or another method
#/YouApp/config/application.rb
module YouApp
class Application < Rails::Application
ENV['SMS_FLY_USER'] = 'You login' # Like this 380675807873
ENV['SMS_FLY_PASS'] = 'Your password' # Your password at https://sms-fly.com/
end
end
#and config/initializers/smsfly.rb
Smsfly.configuration do |config|
config.login = ENV['SMS_FLY_USER']
config.password = ENV['SMS_FLY_PASS']
end
Test connection to API:
Smsfly.authentication?
#this return
true #- If authentication is successful
false #- If authentication failed
Get your balance:
Smsfly.balance
#this return
Float object(like "6.177" ,"5.655")#- If authentication is successful
false #- If authentication failed
TODO:
For show you login and password run:
$ rails c
$ Smsfly.connect_info
If the file smsfly.rb is set up correctly You can send a test message to your own login/phone
Smsfly.test_sms('You random text')
To send a message to other numbers, use
Smsfly.send_sms(text, recipient , description , source) # For example Smsfly.send_sms('Hello Word', '380675807873' , 'Name for Sms' , 'Alfaname')
Add campaignID
log_obj - object where we write campaignID
log_filed - campaignID feld
# for example
history = HistoryItem.new()
history.save
Smsfly.send_sms(text, recipient , description , source , {:log_obj => history, :log_filed => 'campaign_id'} )
# This write campaignID from API TO history.campaign_id
Smsfly.send_sms(text, recipient , description , source , options = {} ) # For example Smsfly.send_sms('Hello Word', '380675807873' , 'Name for Sms' , 'Alfaname' , {:log_obj => 'Model', :log_filed => 'campaign_id'})
After checking out the repo, run bin/setup
to install dependencies. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/Serhii-Danovsky/smsfly. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that smsfly 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
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.