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
Returns list of contacts.
-
#list_ids(params = {}) ⇒ Object
Returns list of contacts ids only.
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
Returns list of contacts. Limits contacts and fields with params if provided
10 11 12 13 14 |
# File 'lib/nimble/contacts.rb', line 10 def list params={} params[:fields] = params[:fields].join(',') if params[:fields] params[:record_type] ||= 'person' @nimble.get "contacts", params end |
#list_ids(params = {}) ⇒ Object
Returns list of contacts ids only. Limits contacts with params if provided
17 18 19 |
# File 'lib/nimble/contacts.rb', line 17 def list_ids params={} @nimble.get "contacts/ids", params end |