Class: Knodes::Client

Inherits:
Object
  • Object
show all
Includes:
Companies, Customers, Documents, Locations, People, Schools, Users, Connection, Request
Defined in:
lib/knodes/client.rb,
lib/knodes/client/users.rb,
lib/knodes/client/people.rb,
lib/knodes/client/schools.rb,
lib/knodes/client/companies.rb,
lib/knodes/client/customers.rb,
lib/knodes/client/documents.rb,
lib/knodes/client/locations.rb

Defined Under Namespace

Modules: Companies, Customers, Documents, Locations, People, Schools, Users

Instance Method Summary collapse

Methods included from Schools

#school, #school_people, #schools_search

Methods included from Companies

#companies_search, #company, #company_people

Methods included from Locations

#location, #location_documents, #location_people, #locations_search

Methods included from Documents

#document, #document_locations, #document_people, #documents_search

Methods included from People

#people_search, #person, #person_companies, #person_documents, #person_locations, #person_people, #person_schools

Methods included from Users

#user, #user_connect, #user_disconnect, #user_do_index, #user_notify_active, #user_notify_inactive, #user_ready, #user_update

Methods included from Customers

#customer, #customer_connect, #customer_disconnect

Methods included from Request

#delete, #get, #post, #put

Methods included from Connection

#connection

Constructor Details

#initialize(options = {}) ⇒ Client

Creates a new client and sets configuration to passed options or their default values



7
8
9
10
11
12
# File 'lib/knodes/client.rb', line 7

def initialize(options={}) 
  options = Knodes.options.merge(options)
  Configuration::VALID_OPTIONS_KEYS.each do |key|
    send("#{key}=", options[key])
  end
end

Instance Method Details

#credsObject

convenience method for returning id/secret



17
18
19
# File 'lib/knodes/client.rb', line 17

def creds
  Hash["customer_id" => customer_id, "customer_secret" => customer_secret]
end