Code Monkey home page Code Monkey logo

nearmiss-ruby's Introduction

nearmiss-ruby

A module for using the Nearmiss REST API and generating valid TwiML. [Click here to read the full documentation.][documentation]

Installation

To install using [Bundler][bundler] grab the latest stable version:

gem 'nearmiss-ruby', '~> 1.0.0'

To manually install nearmiss-ruby via [Rubygems][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.][documentation]

Installation

To install using [Bundler][bundler] grab the latest stable version:

gem 'nearmiss-ruby', '~> 1.0.0'

To manually install nearmiss-ruby via [Rubygems][rubygems] simply gem install:

gem install nearmiss-ruby

To build and install the development branch yourself from the latest source:

git clone [email protected]: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][travis] the following Ruby implementations:

  • Ruby 2.2.0
  • Ruby 2.1.0
  • Ruby 2.0.0
  • Ruby 1.9.3
  • [JRuby][jruby]
  • [Rubinius][rubinius]

Getting help

If you need help installing or using the library, please contact Nearmiss Support at [email protected] 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][examples] directory. Also for those upgrading, the [upgrade guide][upgrade] is available in the [nearmiss-ruby github wiki][wiki].

gem install nearmiss-ruby

To build and install the development branch yourself from the latest source:

git clone [email protected]: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][travis] the following Ruby implementations:

  • Ruby 2.2.0
  • Ruby 2.1.0
  • Ruby 2.0.0
  • Ruby 1.9.3
  • [JRuby][jruby]
  • [Rubinius][rubinius]

Getting help

If you need help installing or using the library, please contact Nearmiss Support at [email protected] 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][examples] directory. Also for those upgrading, the [upgrade guide][upgrade] is available in the [nearmiss-ruby github wiki][wiki].

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.