lib |
spec |
2y .gitignore |
2y .rspec |
2y Gemfile |
2y LICENSE.txt |
2y README.md |
2y Rakefile |
2y service_monster.gemspec |
A Ruby wrapper for the Service Monster REST API.
Add this line to your application's Gemfile:
gem 'service_monster'
And then execute:
$ bundle
Or install it yourself as:
$ gem install service_monster
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_key: "YOUR_KEY_HERE"})
ServiceMonster.configure do |config| config.api_key = "YOUR_KEY_HERE" end client = ServiceMonster.client
There are currently four Service Monster resources implemented in this client; Accounts, Orders, Jobs and Reminders. See the parameters section below for information about what kinds of parameters can be sent to Service Monster.
Getting a list of accounts:
client.accounts(params)
Getting a single account (the id parameter is the Service Monster GUID for the account):
client.account(id, params)
Getting a list of orders:
client.orders(params)
Getting a single order (the id parameter is the Service Monster GUID for the order):
client.order(id, params)
Getting a list of jobs:
client.jobs(params)
Getting a single job (the id parameter is the Service Monster GUID for the job):
client.job(id, params)
Getting a list of reminders:
client.reminders(params)
Getting a single reminder (the id parameter is the Service Monster GUID for the reminder):
client.reminder(id, params)
ServiceMonster supports several parameters that can be passed to their API to change the results you receive.
If you wish to filter a resource for a particular value in a field or set of dates use the following three parameters.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)