PipedrivePUT 1.0.3 → 1.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4c95b687f3f8e4757bca8429f68a2206d91f18ff
4
- data.tar.gz: 43cca1909308e81faa4b1851d53a689dc4c142c8
3
+ metadata.gz: 6b676c35097c0c7a718300a0d97b46f909c2037b
4
+ data.tar.gz: d8a4c91782900a83dea63bbaab02b3ab6fe3baca
5
5
  SHA512:
6
- metadata.gz: a76839194d2d1f43066394c4fb93c50d33ee7ea0292029d7ea1eed6a625a0b3b5f291f80ec85c6db7c0e5bd08de2f6c4e7134c40f802d4b580471457896100ad
7
- data.tar.gz: fd4dfbe43d8eaed695a67e9dbf93b31c5eb07cfec9e32696daf321ce4fdd2f7897f744ef6f85bf594c47372558d4071977852e02614e020dd1b65635e70605cf
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
- @data = @parsed["data"]
26
-
27
- table.push(@data)
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']
@@ -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
- table.push(@data)
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
- table.push(@data)
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']
@@ -1,3 +1,3 @@
1
1
  module PipedrivePUT
2
- VERSION = "1.0.3"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: PipedrivePUT
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - JakePens71