PipedrivePUT 1.1.7 → 1.1.8
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/README.md +6 -0
- data/lib/PipedrivePUT/organization.rb +31 -0
- data/lib/PipedrivePUT/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: f2178019def9566ab6649aaf85ef4f5a09bf450c
|
4
|
+
data.tar.gz: 9ff6538a2b4f50c47f3419807562c1d37464d79d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25388901a36076a7e8175fb1874929264bb0b8c68a6b2e582609dfc5960cd3d84a0d269ac238cacbc6be4c16289a02485740054e8a5733dc6e9a0766dd9d0245
|
7
|
+
data.tar.gz: e6c3a0b6bd3f52a254e57ce5b1ae8cf7fb79a7dfab14a7c7024ec7410b619957a7c1fdc710d669736bf2c26e578284192e8fb1e6db23bd358f4991091ca1cc12
|
data/README.md
CHANGED
@@ -48,6 +48,12 @@ Find Organization by term
|
|
48
48
|
PipedrivePUT::Organizations.findOrganizationByName(< Term >)
|
49
49
|
```
|
50
50
|
|
51
|
+
Find Persons in an Organization
|
52
|
+
```ruby
|
53
|
+
PipedrivePUT::Organizations.getPersonsOfOrganization(< id >)
|
54
|
+
```
|
55
|
+
|
56
|
+
|
51
57
|
## Deals
|
52
58
|
|
53
59
|
Get Specific Deal with ID
|
@@ -99,6 +99,37 @@ include PipedrivePUT
|
|
99
99
|
end
|
100
100
|
|
101
101
|
|
102
|
+
#Get Persons of an Organization
|
103
|
+
def self.getPersonsOfOrganization(id)
|
104
|
+
@start = 0
|
105
|
+
|
106
|
+
table = Array.new
|
107
|
+
@more_items = true
|
108
|
+
tablesize = 0
|
109
|
+
|
110
|
+
while @more_items == true do
|
111
|
+
count = 0
|
112
|
+
|
113
|
+
@base = 'https://api.pipedrive.com/v1/organizations/' + id.to_s + '/persons?&start=' + @start.to_s + '&limit=500&api_token=' + @@key.to_s
|
114
|
+
|
115
|
+
@content = open(@base.to_s).read
|
116
|
+
@parsed = JSON.parse(@content)
|
117
|
+
|
118
|
+
while count < @parsed["data"].size
|
119
|
+
#table.push(@parsed["data"][count])
|
120
|
+
table[tablesize] = @parsed["data"][count]
|
121
|
+
count = count +1
|
122
|
+
tablesize = tablesize + 1
|
123
|
+
|
124
|
+
end
|
125
|
+
@pagination = @parsed['additional_data']['pagination']
|
126
|
+
@more_items = @pagination['more_items_in_collection']
|
127
|
+
#puts @more_items
|
128
|
+
@start = @pagination['next_start']
|
129
|
+
#puts @start
|
130
|
+
end
|
131
|
+
return table
|
132
|
+
end
|
102
133
|
|
103
134
|
end
|
104
135
|
end
|
data/lib/PipedrivePUT/version.rb
CHANGED
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.
|
4
|
+
version: 1.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JakePens71
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|