Module: VTiger::API

Included in:
VTiger
Defined in:
lib/v_tiger/api.rb

Instance Method Summary collapse

Instance Method Details

#create(elementType, element = {}) ⇒ Object



10
11
12
# File 'lib/v_tiger/api.rb', line 10

def create(elementType, element = {})
  post('create', :elementType => elementType, :element => element.to_json)
end

#delete(id) ⇒ Object



26
27
28
# File 'lib/v_tiger/api.rb', line 26

def delete(id)
  post('delete', :id => id)
end

#describe(element_type) ⇒ Object



6
7
8
# File 'lib/v_tiger/api.rb', line 6

def describe(element_type)
  get('describe', :elementType => element_type)['result']
end

#list_typesObject



2
3
4
# File 'lib/v_tiger/api.rb', line 2

def list_types
  get('listtypes')['result']['types']
end

#query(query_string) ⇒ Object



18
19
20
# File 'lib/v_tiger/api.rb', line 18

def query(query_string)
  get('query', :query => query_string)
end

#retrieve(id) ⇒ Object



14
15
16
# File 'lib/v_tiger/api.rb', line 14

def retrieve(id)
  get('retrieve', :id => id)    
end

#update(element) ⇒ Object



22
23
24
# File 'lib/v_tiger/api.rb', line 22

def update(element)
  post('update', :element => element)
end