Class: NimbleApi::Contacts
- Inherits:
-
Object
- Object
- NimbleApi::Contacts
- Defined in:
- lib/nimble/contacts.rb
Instance Method Summary collapse
-
#initialize(nimble) ⇒ Contacts
constructor
A new instance of Contacts.
- #list(params = {}) ⇒ Object
- #list_ids(params = {}) ⇒ Object
Constructor Details
#initialize(nimble) ⇒ Contacts
Returns a new instance of Contacts.
5 6 7 |
# File 'lib/nimble/contacts.rb', line 5 def initialize(nimble) @nimble = nimble end |
Instance Method Details
#list(params = {}) ⇒ Object
9 10 11 12 13 |
# File 'lib/nimble/contacts.rb', line 9 def list params={} params[:fields] = params[:fields].join(',') if params[:fields] params[:record_type] ||= 'person' @nimble.get "contacts", params end |
#list_ids(params = {}) ⇒ Object
15 16 17 |
# File 'lib/nimble/contacts.rb', line 15 def list_ids params={} @nimble.get "contacts/ids", params end |