
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
= Nibbme - SMS web service proxy
The library is a simple {ActiveResource}[http://api.rubyonrails.org/classes/ActiveResource/Base.html]-based proxy that allows you to communicate with the {Nibbme bulk SMS web service}[http://www.nibbme.com]. {Nibbme}[http://www.nibbme.com] is a restfull-designed sistem and you can easily {create your own plugin/gem}[http://www.nibbme.com/wiki] based on the Wiki they provide. If you like plugins and gems read on :).
== Installation
The recommended way is to install a gem:
gem install nibbme
Add this line to your rails project's {RAILS_ROOT}/config/environment.rb:
config.gem 'nibbme'
Because Rails can't load rake tasks from gems open {RAILS_ROOT}/Rakefile and add this:
begin
require 'nibbme/tasks'
rescue LoadError
STDERR.puts "Run rake gems:install
to install nibbme"
end
Open the console, go to your project's root and run the install task:
$ rake nibbme:install
The task creates a configuration file inside your {RAILS_ROOT}/config directory. Now open this file and set variables. The file should look something like this:
default: &defaults site: 'https://www.nibbme.com' email: me@nibbme.com password: mypassword
development: <<: *defaults
test: <<: *defaults
production: <<: *defaults
If you do not already have a Nibbme account then {sign up}[http://www.nibbme.com/account?m=signUp].
That's it! You are ready to rock&role.
== Examples
You will use this library like you use any other {ActiveResource}[http://api.rubyonrails.org/classes/ActiveResource/Base.html] classes.
=== Gateway
A "Simple SMS Gateway" controller is for single SMS delivery.
message = Nibbme::Message.create(:text => 'This is my SMS message.', :country_code => 44, :cell_phone => 99999999) message = Nibbme::Message.create(:text => 'This is my SMS message.', :country_code => 44, :cell_phone => 99999999, :full_name => 'John Rony')
Note that if a client (recipient) does not exist in your profile, he will be automatically created.
=== Groups
You can request data simply by calling a +find+ method.
groups = Nibbme::Group.find(:all) groups = Nibbme::Group.find(:first) groups = Nibbme::Group.find(:last) group = Nibbme::Group.find(15) # Where 15 is a Group ID number
Note that this will return only the items on the first page. You can pass the +page+ variable to get the items on the subpage. If the request is empty you know there is no more items.
groups = Nibbme::Group.find(:all, :params => { :page => 1 })
You can also filter the list through a +tags+ variable.
groups = Nibbme::Group.find(:all, :params => { :page => 1, :tags => 'sun fun' })
You can check if an item exists by calling the +exists?+ method.
exists = Nibbme::Group.exists?(1)
You can also create, update and destroy groups.
group = Nibbme::Group.create
group = Nibbme::Group.create(:title => 'School friends', :description => 'All my friends from the school in US.')
group = Nibbme::Group.find(15) group.title = 'Nibbme Members' group.save
group = Nibbme::Group.find(12) group.destroy
=== Clients
You can request data simply by calling a +find+ method.
clients = Nibbme::Client.find(:all) clients = Nibbme::Client.find(:first) clients = Nibbme::Client.find(:last) client = Nibbme::Client.find(15) # Where 15 is a Client ID number
Note that this will return only the items on the first page. You can pass the +page+ variable to get the items on the subpage. If the request is empty you know there is no more items.
clients = Nibbme::Client.find(:all, :params => { :page => 1 })
You can also filter the list through a +tags+ variable.
clients = Nibbme::Client.find(:all, :params => { :page => 1, :tags => 'john' })
You can check if an item exists by calling the +exists?+ method.
exists = Nibbme::Client.exists?(1)
You can also create, update and destroy clients.
client = Nibbme::Client.create
client = Nibbme::Client.create(:cell_phone => '99999999', :country_id => 44, :name => 'John', :surname => 'Hill', :group_ids => '22,41,512')
client = Nibbme::Client.find(15) client.country_id = 44 client.save
client = Nibbme::Client.find(12) client.destroy
=== Messages
You can request data simply by calling a +find+ method.
messages = Nibbme::Message.find(:all) messages = Nibbme::Message.find(:first) messages = Nibbme::Message.find(:last) message = Nibbme::Message.find(15) # Where 15 is a Message ID number
Note that this will return only the items on the first page. You can pass the +page+ variable to get the items on the subpage. If the request is empty you know there is no more items.
messages = Nibbme::Message.find(:all, :params => { :page => 1 })
You can also filter the list through a +tags+ variable.
messages = Nibbme::Message.find(:all, :params => { :page => 1, :tags => 'john' })
You can check if an item exists by calling the +exists?+ method.
exists = Nibbme::Message.exists?(1)
You can also create, update and destroy messages.
message = Nibbme::Message.create
message = Nibbme::Message.create(:text => 'This is my SMS message.', :active_from => 3.hours.from_now, :group_ids => '21,44,5')
message = Nibbme::Message.find(15) message.text = 'Nibbme is rocks!' message.save
message = Nibbme::Message.find(12) message.destroy
You can queue a message by calling a +queue+ method.
message = Nibbme::Message.find(12) message.queue
You can reset/restart the delivery process by calling a +reset+ method.
message = Nibbme::Message.find(12) message.reset
=== Error Handling
Similar to ActiveRecord all errors are logged as part of +errors+ variable.
message = Message.create(:cell_phone => 'aaaaa') message.errors[:cell_phone]
You can find more about error handling {here}[http://api.rubyonrails.org/classes/ActiveResource/Validations.html].
=== Logs (Tracking SMS Status)
You can request data simply by calling a +find+ method.
logs = Nibbme::SmsLog.find(:all) logs = Nibbme::SmsLog.find(:first) logs = Nibbme::SmsLog.find(:last) logs = Nibbme::SmsLog.find(15) # Where 15 is a SmsLog ID number
Note that this will return only the items on the first page. You can pass the +page+ variable to get the items on the subpage. If the request is empty you know there is no more items.
logs = Nibbme::SmsLog.find(:all, :params => { :page => 1 })
You can also filter the list through a +tags+ variable.
logs = Nibbme::SmsLog.find(:all, :params => { :page => 1, :tags => '313' })
You can check if an item exists by calling the +exists?+ method.
exists = Nibbme::SmsLog.exists?(1)
Usually you will know a message and client ID. You can check an SMS status as follows
log = Nibbme::SmsLog.find_one(14, 50)
log.delivered?
log.failed?
log.state
== Links
FAQs
Unknown package
We found that nibbme 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
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.