gooddata_eloqua 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gooddata_eloqua/client.rb +5 -0
- data/lib/gooddata_eloqua/helpers/request.rb +19 -4
- data/lib/gooddata_eloqua/models/forms.rb +15 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c44b61d7f5b03be69a4313395f9c5945fca8245f
|
4
|
+
data.tar.gz: 7703791ac30e6253fd913575bdb656064e859d6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87d54e5d7b778ab78864da5cc7f463f0c0f0c5bfeff5f0ae2512d40ef1ea592e054cc29b10e3984342b44695a033db8078a196d8e517bfdebcba536a80dff372
|
7
|
+
data.tar.gz: 086dc989ce4be40123781948043e8b298e2b855edc9a284811cfdb1fc86aeaca9e07d9234d2eb7813db8efce54635b9cf9e26c1745867b51b85056b7f576a4db
|
@@ -29,6 +29,10 @@ class GoodDataEloqua::Client
|
|
29
29
|
GoodDataEloqua::Contacts.new(config)
|
30
30
|
end
|
31
31
|
|
32
|
+
def forms(config={})
|
33
|
+
GoodDataEloqua::Forms.new(config)
|
34
|
+
end
|
35
|
+
|
32
36
|
def system_check(refresh = false)
|
33
37
|
|
34
38
|
if refresh
|
@@ -47,3 +51,4 @@ require_relative 'helpers/request'
|
|
47
51
|
require_relative 'models/campaigns'
|
48
52
|
require_relative 'models/emails'
|
49
53
|
require_relative 'models/contacts'
|
54
|
+
require_relative 'models/forms'
|
@@ -31,20 +31,35 @@ class GoodDataEloqua::Request
|
|
31
31
|
|
32
32
|
def write_all_ids_return_csv(file_name, config={})
|
33
33
|
|
34
|
+
|
34
35
|
if file_name
|
35
36
|
fd = IO.sysopen("./downloads/#{file_name}", 'w+')
|
36
37
|
end
|
37
38
|
|
38
39
|
csv = CSV.new(IO.new(fd))
|
39
|
-
|
40
|
-
|
40
|
+
|
41
|
+
first_download = self.get_all_by_page(0)
|
42
|
+
pages = first_download['total'].to_i
|
41
43
|
total = (pages/1000).round
|
42
44
|
|
43
45
|
total = 1 if total == 0
|
44
46
|
|
45
|
-
|
46
|
-
|
47
|
+
if total == 1
|
48
|
+
|
49
|
+
first_download['elements'].each { |record|
|
50
|
+
csv << [record['id']]
|
51
|
+
}
|
52
|
+
|
53
|
+
csv.flush
|
47
54
|
|
55
|
+
puts "\n#{Time.now} => Flushing IO (#{@session_csv}.id)..."
|
56
|
+
|
57
|
+
else
|
58
|
+
|
59
|
+
self.get_all_distributed total, csv
|
60
|
+
puts "\n#{Time.now} => Flushing IO (#{@session_csv}.id)..."
|
61
|
+
|
62
|
+
end
|
48
63
|
|
49
64
|
file_name
|
50
65
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
|
2
|
+
class GoodDataEloqua::Forms < GoodDataEloqua::Request
|
3
|
+
|
4
|
+
def initialize(config={})
|
5
|
+
@client = $client
|
6
|
+
|
7
|
+
@client = $client
|
8
|
+
@session_id = SecureRandom.hex+"_forms"
|
9
|
+
@session_csv = @session_id+".csv"
|
10
|
+
self.set_asset_type('forms')
|
11
|
+
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gooddata_eloqua
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick McConlogue
|
@@ -94,6 +94,7 @@ files:
|
|
94
94
|
- lib/gooddata_eloqua/models/campaigns.rb
|
95
95
|
- lib/gooddata_eloqua/models/contacts.rb
|
96
96
|
- lib/gooddata_eloqua/models/emails.rb
|
97
|
+
- lib/gooddata_eloqua/models/forms.rb
|
97
98
|
homepage: https://github.com/thnkr/connectors/tree/master/eloqua
|
98
99
|
licenses:
|
99
100
|
- MIT
|