Skip to content

rhuntCL/service_monster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

we still love CAPS!!!

ServiceMonster

A Ruby wrapper for the Service Monster REST API.

Installation

Add this line to your application's Gemfile:

gem 'service_monster'

And then execute:

$ bundle

Or install it yourself as:

$ gem install service_monster

Usage

Configuration

Before you can make calls to ServiceMonster you must configure the library with a valid API Token. You can request a token be generated by ServiceMonster. The API Token ties the API request to a particualr ServiceMonster company id.

There are two ways to configure the ServiceMonster gem. You can pass a hash of configuration options when you create a client, or you can use a configure block.

client = ServiceMonster.client({api_token: "YOUR_TOKEN_HERE"})
ServiceMonster.configure do |config|
  config.api_token = "YOUR_TOKEN_HERE"
end

client = ServiceMonster.client

Parameters

ServiceMonster supports several parameters that can be passed to their API to change the results you receive.

  • q: Search term. Supply this parameter with a value to return results on which this search term matches at least one of the fields.
  • fields: Field list. Supply a comma separated list of fields you would like to be returned. See http://developer.servicemonster.net/Documentation.aspx?ID=1 for a list of resources and the available fields for each.
  • limit: The number of records to return in the result. Defaults to 10.
  • page: The page of data to return in the result. Defaults to the first page of data.

If you wish to filter a resource for a particular value in a field or set of dates use the following three parameters.

  • wField: A field name from the resource to filter on.
  • wOperator: An operator to use with the filter field. This can be one of:
    • gt
    • lt
    • eq
  • wValue: The value used to filter the wField with.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

Wrapper for the Service Monster API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages