PipedrivePUT 1.0.3 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/PipedrivePUT/organization.rb +6 -3
- data/lib/PipedrivePUT/search.rb +12 -7
- data/lib/PipedrivePUT/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b676c35097c0c7a718300a0d97b46f909c2037b
|
4
|
+
data.tar.gz: d8a4c91782900a83dea63bbaab02b3ab6fe3baca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 186aacb67e994bcf2b4a47aa70de7d4538f8271faf143224e9e1b96d26794da0c787ac3f8c8f7857ce39ec7f88934e6381114f80c732c965a5adb4aa06ee2826
|
7
|
+
data.tar.gz: 91f6abb2837f775bdff03f7004c87695e858c2d827838c2b13559f427f5c410486d54220493060f061321a8992bd56cb1ebf44bcaa73b7b5e8ac830ff6040e13
|
@@ -17,14 +17,17 @@ include PipedrivePUT
|
|
17
17
|
@more_items = true
|
18
18
|
|
19
19
|
while @more_items == true do
|
20
|
+
count = 0
|
20
21
|
#puts @more_items
|
21
22
|
@base = 'https://api.pipedrive.com/v1/organizations?start=' + @start.to_s + '&limit=500&api_token=' + @@key.to_s
|
22
23
|
#puts @base
|
23
24
|
@content = open(@base.to_s).read
|
24
25
|
@parsed = JSON.parse(@content)
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
|
27
|
+
while count < @parsed["data"].size
|
28
|
+
table.push(@parsed["data"][count])
|
29
|
+
count = count +1
|
30
|
+
end
|
28
31
|
|
29
32
|
@pagination = @parsed['additional_data']['pagination']
|
30
33
|
@more_items = @pagination['more_items_in_collection']
|
data/lib/PipedrivePUT/search.rb
CHANGED
@@ -30,18 +30,21 @@ module PipedrivePUT
|
|
30
30
|
@item_type = args[0].downcase
|
31
31
|
|
32
32
|
while @more_items == true do
|
33
|
+
count = 0
|
33
34
|
@base = 'https://api.pipedrive.com/v1/searchResults?term=' + term.to_s + '&item_type=' + @item_type.to_s + '&' + @start.to_s + '&limit=500&api_token=' + @@key.to_s
|
34
35
|
|
35
|
-
puts @base
|
36
|
+
#puts @base
|
36
37
|
|
37
38
|
@content = open(@base.to_s).read
|
38
39
|
|
39
|
-
puts @content
|
40
|
+
#puts @content
|
40
41
|
|
41
42
|
@parsed = JSON.parse(@content)
|
42
|
-
@data = @parsed["data"]
|
43
43
|
|
44
|
-
|
44
|
+
while count < @parsed["data"].size
|
45
|
+
table.push(@parsed["data"][count])
|
46
|
+
count = count +1
|
47
|
+
end
|
45
48
|
|
46
49
|
@pagination = @parsed['additional_data']['pagination']
|
47
50
|
@more_items = @pagination['more_items_in_collection']
|
@@ -59,7 +62,7 @@ module PipedrivePUT
|
|
59
62
|
|
60
63
|
while @more_items == true do
|
61
64
|
@base = 'https://api.pipedrive.com/v1/searchResults?term=' + term.to_s + '&' + @start.to_s + '&limit=500&api_token=' + @@key.to_s
|
62
|
-
|
65
|
+
count = 0
|
63
66
|
puts @base
|
64
67
|
|
65
68
|
@content = open(@base.to_s).read
|
@@ -67,9 +70,11 @@ module PipedrivePUT
|
|
67
70
|
puts @content
|
68
71
|
|
69
72
|
@parsed = JSON.parse(@content)
|
70
|
-
@data = @parsed["data"]
|
71
73
|
|
72
|
-
|
74
|
+
while count < @parsed["data"].size
|
75
|
+
table.push(@parsed["data"][count])
|
76
|
+
count = count +1
|
77
|
+
end
|
73
78
|
|
74
79
|
@pagination = @parsed['additional_data']['pagination']
|
75
80
|
@more_items = @pagination['more_items_in_collection']
|
data/lib/PipedrivePUT/version.rb
CHANGED