nearmiss-ruby¶ ↑
A module for using the Nearmiss
REST API and generating valid TwiML. [Click here to read the full documentation.]
Installation¶ ↑
To install using [Bundler] grab the latest stable version:
gem 'nearmiss-ruby', '~> 1.0.0'
To manually install nearmiss-ruby
via [Rubygems] simply gem install:
nearmiss-ruby¶ ↑
A module for using the Nearmiss
REST API and generating valid TwiML. [Click here to read the full documentation.]
Installation¶ ↑
To install using [Bundler] grab the latest stable version:
gem 'nearmiss-ruby', '~> 1.0.0'
To manually install nearmiss-ruby
via [Rubygems] simply gem install:
gem install nearmiss-ruby
To build and install the development branch yourself from the latest source:
git clone git@github.com:nearmiss/nearmiss-ruby.git cd nearmiss-ruby make install
Getting Started With REST¶ ↑
Setup Work¶ ↑
require 'rubygems' # not necessary with ruby 1.9 but included for completeness require 'nearmiss-ruby' # put your own credentials here account_sid = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' auth_token = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy' # set up a client to talk to the Nearmiss REST API @client = Nearmiss::REST::Client.new account_sid, auth_token # alternatively, you can preconfigure the client like so Nearmiss.configure do |config| config.account_sid = account_sid config.auth_token = auth_token end # and then you can create a new client without parameters @client = Nearmiss::REST::Client.new
List Projects¶ ↑
You can look up a list of all projects.
# list calls made or received on or after May 13, 2013 @client.project_list("start_time>" => "2013-05-13") # Notice we omit the "=" in the "start_time>=" parameter because it is automatically added
List Categories¶ ↑
You can look up a list of all defined categories.
# list calls made or received on or after May 13, 2013 @client.categories() # Notice we omit the "=" in the "start_time>=" parameter because it is automatically added
Supported Ruby Versions¶ ↑
This library supports and is [tested against] the following Ruby implementations:
Getting help¶ ↑
If you need help installing or using the library, please contact Nearmiss
Support at help@nearmiss.com first. Nearmiss’s Support staff are well-versed in all of the Nearmiss
Helper Libraries, and usually reply within 24 hours.
If you’ve instead found a bug in the library or would like new features added, go ahead and open issues or pull requests against this repo!
More Information¶ ↑
There are more detailed examples in the included [examples] directory. Also for those upgrading, the [upgrade guide] is available in the [nearmiss-ruby github wiki].
gem install nearmiss-ruby
To build and install the development branch yourself from the latest source:
git clone git@github.com:nearmiss/nearmiss-ruby.git cd nearmiss-ruby make install
Getting Started With REST¶ ↑
Setup Work¶ ↑
require 'rubygems' # not necessary with ruby 1.9 but included for completeness require 'nearmiss-ruby' # put your own credentials here account_sid = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' auth_token = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy' # set up a client to talk to the Nearmiss REST API @client = Nearmiss::REST::Client.new account_sid, auth_token # alternatively, you can preconfigure the client like so Nearmiss.configure do |config| config.account_sid = account_sid config.auth_token = auth_token end # and then you can create a new client without parameters @client = Nearmiss::REST::Client.new
List Projects¶ ↑
You can look up a list of all projects.
# list calls made or received on or after May 13, 2013 @client.project_list("start_time>" => "2013-05-13") # Notice we omit the "=" in the "start_time>=" parameter because it is automatically added
List Categories¶ ↑
You can look up a list of all defined categories.
# list calls made or received on or after May 13, 2013 @client.categories() # Notice we omit the "=" in the "start_time>=" parameter because it is automatically added
Supported Ruby Versions¶ ↑
This library supports and is [tested against] the following Ruby implementations:
Getting help¶ ↑
If you need help installing or using the library, please contact Nearmiss
Support at help@nearmiss.com first. Nearmiss’s Support staff are well-versed in all of the Nearmiss
Helper Libraries, and usually reply within 24 hours.
If you’ve instead found a bug in the library or would like new features added, go ahead and open issues or pull requests against this repo!
Development¶ ↑
If you want to hack on Nearmiss
locally, we try to make bootstrapping the project as painless as possible. To start hacking, clone and run:
To get started call
./script/bootstrap
To build the gem, call the following from the terminal:
./script/package
To push new version to RubyGem and create a git version tag:
./script/release
More Information¶ ↑
There are more detailed examples in the included [examples] directory. Also for those upgrading, the [upgrade guide] is available in the [nearmiss-ruby github wiki].