Class: EloquaApiService::Form

Inherits:
Service
  • Object
show all
Defined in:
lib/eloqua_api_service/form.rb

Constant Summary collapse

BASE_PATH =
"/API/REST/2.0"

Instance Method Summary collapse

Methods inherited from Service

#initialize, #parse, #parse_body

Constructor Details

This class inherits a constructor from EloquaApiService::Service

Instance Method Details

#allObject



11
12
13
# File 'lib/eloqua_api_service/form.rb', line 11

def all
  parse(self.class.get("#{BASE_PATH}/assets/forms?depth=complete", @options))
end

#data(id:, options: {}) ⇒ Object



19
20
21
22
# File 'lib/eloqua_api_service/form.rb', line 19

def data(id:, options: {})
  start_at = options[:start_at] || 0
  parse(self.class.get("#{BASE_PATH}/data/form/#{id}?startAt=#{start_at.to_i}", @options))
end

#find(id:) ⇒ Object



7
8
9
# File 'lib/eloqua_api_service/form.rb', line 7

def find(id:)
  parse(self.class.get("#{BASE_PATH}/assets/form/#{id}?depth=complete", @options))
end

#search(term: '') ⇒ Object



15
16
17
# File 'lib/eloqua_api_service/form.rb', line 15

def search(term: '')
  parse(self.class.get("#{BASE_PATH}/assets/forms?search=*#{term}*&depth=complete", @options))
end