Class: NetProspex::Client

Inherits:
Object
  • Object
show all
Includes:
Helpers::Formatters, QueryMethods
Defined in:
lib/netprospex/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from QueryMethods

#find_people, #find_person, #find_person_by_email, #find_person_by_id

Methods included from Helpers::Formatters

#rubyize_keys, #stringify_query, #unrubyize_keys

Constructor Details

#initialize(token, secret) ⇒ Client



11
12
13
14
# File 'lib/netprospex/client.rb', line 11

def initialize(token, secret)
  @token = token
  @secret = secret
end

Instance Attribute Details

#account_balanceObject (readonly)

Returns the value of attribute account_balance.



9
10
11
# File 'lib/netprospex/client.rb', line 9

def 
  @account_balance
end

Instance Method Details

#get(path, query = {}) ⇒ Object



16
17
18
# File 'lib/netprospex/client.rb', line 16

def get(path, query={})
  http.get(api_url(path, query)).body
end

#post(path, params = {}) ⇒ Object



20
21
22
# File 'lib/netprospex/client.rb', line 20

def post(path, params={})
  http.post(api_url(path), params).body
end