Class: GoodDataEloqua::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/gooddata_eloqua/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(config = {}) ⇒ Client

Returns a new instance of Client.



13
14
15
16
17
18
19
# File 'lib/gooddata_eloqua/client.rb', line 13

def initialize(config={})
  $global_id = SecureRandom.hex
  $client = config[:eloqua] || config[:client]

  self.system_check

end

Instance Method Details

#campaigns(config = {}) ⇒ Object



21
22
23
# File 'lib/gooddata_eloqua/client.rb', line 21

def campaigns(config={})
  GoodDataEloqua::Campaigns.new(config)
end

#contacts(config = {}) ⇒ Object



29
30
31
# File 'lib/gooddata_eloqua/client.rb', line 29

def contacts(config={})
  GoodDataEloqua::Contacts.new(config)
end

#emails(config = {}) ⇒ Object



25
26
27
# File 'lib/gooddata_eloqua/client.rb', line 25

def emails(config={})
  GoodDataEloqua::Emails.new(config)
end

#forms(config = {}) ⇒ Object



33
34
35
# File 'lib/gooddata_eloqua/client.rb', line 33

def forms(config={})
  GoodDataEloqua::Forms.new(config)
end

#system_check(refresh = false) ⇒ Object



37
38
39
40
41
42
43
44
45
# File 'lib/gooddata_eloqua/client.rb', line 37

def system_check(refresh = false)

  if refresh
    FileUtils.rm_rf('downloads')
  end

  FileUtils.mkdir_p 'downloads'

end