PipedrivePUT 1.1.14 → 1.1.15
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 +10 -2
- data/lib/PipedrivePUT.rb +1 -0
- data/lib/PipedrivePUT/organization_field.rb +40 -0
- data/lib/PipedrivePUT/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3362cc318718bb21685dbcdaf07d26e548c8a875
|
4
|
+
data.tar.gz: c6e151f2d8441f5905c146cd0a52b154dcc4d213
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c29414d1c0cfec621dc9ba30eca48bf864f68c8a084a627ffe4f586f772f1bb4bd3a0031991c8138848083c37fbe493e1036aca22388588bfa59c7d961da94c
|
7
|
+
data.tar.gz: c43ffcb3364cf13d30fbf1282e591256e2e92e099c867c7ccdbfaca59bdb99bdd975fe90ebcfef8bb664699a9d88b0e6a99622520b0e7f03e503ef8b137462c6
|
data/README.md
CHANGED
@@ -142,13 +142,13 @@ Add a person to Pipedrive
|
|
142
142
|
|
143
143
|
```ruby
|
144
144
|
PipedrivePUT::Persons.addPerson(< Name of Person >, < additional params >)
|
145
|
-
```
|
145
|
+
```
|
146
146
|
|
147
147
|
Example:
|
148
148
|
|
149
149
|
```ruby
|
150
150
|
PipedrivePUT::Persons.addPerson("Programming Test Person", {:org_id => 15367, :phone => [{:value=>'555-555-3340',:label=>'work'},{:value=>'555-111-1111',:label=>'home'}]})
|
151
|
-
```
|
151
|
+
```
|
152
152
|
|
153
153
|
NOTE: The option arguments do not be put in as strings. As of right now that is not working in irb console. I will attempt to see if that plays a factor in rails its self.
|
154
154
|
|
@@ -172,6 +172,14 @@ Get all Recent changes from Pipedrive based on a specific time
|
|
172
172
|
PipedrivePUT::Recents.getRecent(< Time.now >)
|
173
173
|
```
|
174
174
|
|
175
|
+
## Organization Fields
|
176
|
+
|
177
|
+
Get all fields that are able to be used in an organization
|
178
|
+
```ruby
|
179
|
+
PipedrivePUT::OrganizationFields.getAllOrganizationFields()
|
180
|
+
```
|
181
|
+
|
182
|
+
|
175
183
|
NOTE: This searches for everything in Pipedrive (deal, organization, user, state, product, etc.)
|
176
184
|
|
177
185
|
I hope to add additional support to break this down at a later time.
|
data/lib/PipedrivePUT.rb
CHANGED
@@ -0,0 +1,40 @@
|
|
1
|
+
module PipedrivePUT
|
2
|
+
class OrganizationFields
|
3
|
+
|
4
|
+
include PipedrivePUT
|
5
|
+
|
6
|
+
def self.getAllOrganizationFields()
|
7
|
+
|
8
|
+
@start = 0
|
9
|
+
|
10
|
+
table = Array.new
|
11
|
+
@more_items = true
|
12
|
+
tablesize = 0
|
13
|
+
while @more_items == true do
|
14
|
+
count = 0
|
15
|
+
#puts @more_items
|
16
|
+
@base = 'https://api.pipedrive.com/v1/organizationFields?start=' + @start.to_s + '&limit=500&api_token=' + @@key.to_s
|
17
|
+
#puts @base
|
18
|
+
@content = open(@base.to_s).read
|
19
|
+
@parsed = JSON.parse(@content)
|
20
|
+
|
21
|
+
while count < @parsed["data"].size
|
22
|
+
#table.push(@parsed["data"][count])
|
23
|
+
table[tablesize] = @parsed["data"][count]
|
24
|
+
count = count +1
|
25
|
+
tablesize = tablesize + 1
|
26
|
+
end
|
27
|
+
|
28
|
+
@pagination = @parsed['additional_data']['pagination']
|
29
|
+
@more_items = @pagination['more_items_in_collection']
|
30
|
+
#puts @more_items
|
31
|
+
@start = @pagination['next_start']
|
32
|
+
#puts @start
|
33
|
+
end
|
34
|
+
|
35
|
+
return table
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
end
|
40
|
+
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.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JakePens71
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -122,6 +122,7 @@ files:
|
|
122
122
|
- lib/PipedrivePUT.rb
|
123
123
|
- lib/PipedrivePUT/deal.rb
|
124
124
|
- lib/PipedrivePUT/organization.rb
|
125
|
+
- lib/PipedrivePUT/organization_field.rb
|
125
126
|
- lib/PipedrivePUT/persons.rb
|
126
127
|
- lib/PipedrivePUT/pipelines.rb
|
127
128
|
- lib/PipedrivePUT/recents.rb
|
@@ -148,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
149
|
version: '0'
|
149
150
|
requirements: []
|
150
151
|
rubyforge_project:
|
151
|
-
rubygems_version: 2.4.
|
152
|
+
rubygems_version: 2.4.5
|
152
153
|
signing_key:
|
153
154
|
specification_version: 4
|
154
155
|
summary: Pipedrive gem to retrieve data from Pipedrive.com
|