unbounce 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/unbounce.rb +44 -3
- data/lib/unbounce/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 365f5ba76e565bdffb3d80470dbf718f5ac4947c
|
4
|
+
data.tar.gz: 88435ca63a70dddc565133cd26c2a977834db775
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87c7d42c808659ea1479e133aaaab8425e8dfeb2cb2f8b4f8059b8180980adb003a093247f6c4fc69a5eda93ce5ae66e27db2b002fbe4a6fd12c08ed4174a957
|
7
|
+
data.tar.gz: d7b7742e3c2ca41100009ff52271602ab24f04e6459865c5015ef27aa4bdd2394ae0ed301afb4520c2c49bb8efed116f017ef1f973f091c2d1f1f5392598f9bd
|
data/lib/unbounce.rb
CHANGED
@@ -50,9 +50,50 @@ module Unbounce
|
|
50
50
|
|
51
51
|
def get_responses(opts = {})
|
52
52
|
params = set_params(opts)
|
53
|
-
response = parse_json(RestClient.get(@url+params[:path], params: params,Authorization: @auth, headers: @headers)).body
|
54
|
-
|
55
|
-
|
53
|
+
response = parse_json(RestClient.get(@url+params[:path], params: params,Authorization: @auth, headers: @headers)).body
|
54
|
+
|
55
|
+
more = response["metadata"]["next"].nil? ? nil : response["metadata"]["next"]["href"]
|
56
|
+
|
57
|
+
while more
|
58
|
+
more_response = parse_json(RestClient.get(more,Authorization: @auth, headers: @headers)).body
|
59
|
+
|
60
|
+
if more_response["leads"]
|
61
|
+
response["leads"].push(more_response["leads"])
|
62
|
+
response["leads"].flatten!
|
63
|
+
end
|
64
|
+
|
65
|
+
if more_response["domains"]
|
66
|
+
response["domains"].push(more_response["domains"])
|
67
|
+
response["domains"].flatten!
|
68
|
+
end
|
69
|
+
|
70
|
+
if more_response["pages"]
|
71
|
+
response["pages"].push(more_response["pages"])
|
72
|
+
response["pages"].flatten!
|
73
|
+
end
|
74
|
+
|
75
|
+
if more_response["page_groups"]
|
76
|
+
response["page_groups"].push(more_response["page_groups"])
|
77
|
+
response["page_groups"].flatten!
|
78
|
+
end
|
79
|
+
|
80
|
+
if more_response["sub_accounts"]
|
81
|
+
response["sub_accounts"].push(more_response["sub_accounts"])
|
82
|
+
response["sub_accounts"].flatten!
|
83
|
+
end
|
84
|
+
|
85
|
+
if more_response["accounts"]
|
86
|
+
response["accounts"].push(more_response["accounts"])
|
87
|
+
response["accounts"].flatten!
|
88
|
+
end
|
89
|
+
|
90
|
+
if more_response["form_fields"]
|
91
|
+
response["form_fields"].push(more_response["form_fields"])
|
92
|
+
response["form_fields"].flatten!
|
93
|
+
end
|
94
|
+
|
95
|
+
more = more_response["metadata"]["next"].nil? ? nil : more_response["metadata"]["next"]["href"]
|
96
|
+
end
|
56
97
|
|
57
98
|
return response
|
58
99
|
end
|
data/lib/unbounce/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unbounce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Hoskison
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|