PipedrivePUT 1.1.3 → 1.1.5

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: 1dcba20de85601bc400c08de08a1d91117e173df
4
- data.tar.gz: b4b302a49f207ed91271efbc3da037d6350ced5a
3
+ metadata.gz: 2d102ebd7b14af1347ef08004f72de70da5a8b51
4
+ data.tar.gz: 1a8275b51ca550bb80efaacf3add5576deea4a22
5
5
  SHA512:
6
- metadata.gz: 2983ce3b9d1f1af34497e728800afc79bb8b319da7efbe2a03e952381af2b7dda6bfbc53bc4cb02568e707acefbcee3956e7c4de8c60ec5a9a9ece3ee5fdbcaa
7
- data.tar.gz: 14ff8135299ab3af76800ce2202e819cdc6a4d4cec167f8d5e0ee94a96b7b5295ad592878d7160fc9ecf9bd84fe29ba240e79762aeef4b1140963d4d3eb4f8a8
6
+ metadata.gz: 114d4d3ca103522d0791a5f3c10dd90e18cdb7f3b9a480899ef94eb55937809cd5cbd2f0e2a487560c012bfac1aa33289004eee84d0e2a83a38d374a84fbba5c
7
+ data.tar.gz: b53802e091c3aa22e459abc6a9ca7b3c1001990b5fe67289cced0ed4727fcd4bbcad7363133da31f74879376aaaa0bb90d263eca9f75f1aa33407bca297a694e
data/README.md CHANGED
@@ -53,7 +53,13 @@ Find Organization by term
53
53
  Get Specific Deal with ID
54
54
 
55
55
  ```ruby
56
- PipedrivePUT::Deals.getDeal(<id>)
56
+ PipedrivePUT::Deal.getDeal(<id>)
57
+ ```
58
+
59
+ Get All Deals
60
+
61
+ ```ruby
62
+ PipedrivePUT::Deal.getAllDeals
57
63
  ```
58
64
 
59
65
  ## Search
@@ -11,6 +11,39 @@ module PipedrivePUT
11
11
  end
12
12
 
13
13
 
14
+ def self.getAllDeals
15
+
16
+ @start = 0
17
+
18
+ table = Array.new
19
+ @more_items = true
20
+ tablesize = 0
21
+ while @more_items == true do
22
+ count = 0
23
+ #puts @more_items
24
+ @base = 'https://api.pipedrive.com/v1/deals?start=' + @start.to_s + '&limit=500&api_token=' + @@key.to_s
25
+ #puts @base
26
+ @content = open(@base.to_s).read
27
+ @parsed = JSON.parse(@content)
28
+
29
+ while count < @parsed["data"].size
30
+ #table.push(@parsed["data"][count])
31
+ table[tablesize] = @parsed["data"][count]
32
+ count = count +1
33
+ tablesize = tablesize + 1
34
+ end
35
+
36
+ @pagination = @parsed['additional_data']['pagination']
37
+ @more_items = @pagination['more_items_in_collection']
38
+ #puts @more_items
39
+ @start = @pagination['next_start']
40
+ #puts @start
41
+ end
42
+
43
+ return table
44
+ end
45
+ end
46
+
14
47
  end
15
48
 
16
49
  end
@@ -1,3 +1,3 @@
1
1
  module PipedrivePUT
2
- VERSION = "1.1.3"
2
+ VERSION = "1.1.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: PipedrivePUT
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - JakePens71
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-28 00:00:00.000000000 Z
11
+ date: 2015-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
131
  version: '0'
132
132
  requirements: []
133
133
  rubyforge_project:
134
- rubygems_version: 2.4.5
134
+ rubygems_version: 2.4.6
135
135
  signing_key:
136
136
  specification_version: 4
137
137
  summary: Pipedrive gem to retrieve data from Pipedrive.com