Class: VTiger
- Inherits:
-
Object
show all
- Includes:
- API
- Defined in:
- lib/v_tiger.rb,
lib/v_tiger/version.rb
Defined Under Namespace
Modules: API, Query
Constant Summary
collapse
- VERSION =
"0.0.1.3"
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from API
#create, #delete, #describe, #list_types, #query, #retrieve, #update
Class Method Details
.config(config = {}) ⇒ Object
19
20
21
22
23
|
# File 'lib/v_tiger.rb', line 19
def self.config(config = {})
VTiger.user = config[:user]
VTiger.key = config[:key]
VTiger.uri = config[:uri]
end
|
Instance Method Details
#get(operation, query = {}) ⇒ Object
25
26
27
28
|
# File 'lib/v_tiger.rb', line 25
def get(operation, query = {})
query = {:operation => operation, :sessionName => VTiger.session}.merge(query)
HTTParty.get(VTiger.uri, :query => query).parsed_response
end
|
#post(operation, body = {}) ⇒ Object
30
31
32
33
|
# File 'lib/v_tiger.rb', line 30
def post(operation, body = {})
body = {:operation => operation, :sessionName => VTiger.session}.merge(body)
HTTParty.post(VTiger.uri, :body => body).parsed_response
end
|