PipedrivePUT 1.1.6 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +26 -0
- data/lib/PipedrivePUT.rb +2 -0
- data/lib/PipedrivePUT/persons.rb +51 -0
- data/lib/PipedrivePUT/pipelines.rb +46 -0
- data/lib/PipedrivePUT/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 380ff0c69aecb23dc2e5a55e4c615d09cf6ca442
|
4
|
+
data.tar.gz: cf2eef758e97b19692ae13aee65dfa460aa5a19e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1d0024b0bfcbce86a5435fefa6e984e562f99acadb60be2b162c10d4d0f8caf03d6e30d570e16b6e7f397e05c8fa0eed60f90e08a4720471c1f0e2b656d0dcc
|
7
|
+
data.tar.gz: 447b4e0a7f87f4125ce99f30950068e5a07ef3afc349ae61537b8fd940200bdaa42a45a839ec827dc246aea02a1bac6ecc6997e962e19420a94ce833d3c1fd0e
|
data/README.md
CHANGED
@@ -90,6 +90,32 @@ Get All users for your company
|
|
90
90
|
PipedrivePUT::Users.getAllUsers
|
91
91
|
```
|
92
92
|
|
93
|
+
## Persons
|
94
|
+
|
95
|
+
Get all persons from Pipedrive
|
96
|
+
```ruby
|
97
|
+
PipedrivePUT::Persons.getAllPersons
|
98
|
+
```
|
99
|
+
|
100
|
+
Get specifi Person from Pipedrive
|
101
|
+
|
102
|
+
```ruby
|
103
|
+
PipedrivePUT::Persons.detailsOfPerson(< id >)
|
104
|
+
```
|
105
|
+
|
106
|
+
## Pipelines
|
107
|
+
|
108
|
+
Get all Pipelines
|
109
|
+
```ruby
|
110
|
+
PipedrivePUT::Pipelines.getAllPipelines
|
111
|
+
```
|
112
|
+
|
113
|
+
Get one Pipeline
|
114
|
+
```ruby
|
115
|
+
PipedrivePUT::Pipelines.getOnePipeline(< id >)
|
116
|
+
```
|
117
|
+
|
118
|
+
|
93
119
|
Data is returned in JSON format.
|
94
120
|
|
95
121
|
This can be easily customized. I needed something quickly and easily for my own personal project.
|
data/lib/PipedrivePUT.rb
CHANGED
@@ -0,0 +1,51 @@
|
|
1
|
+
module PipedrivePUT
|
2
|
+
class Persons
|
3
|
+
include PipedrivePUT
|
4
|
+
|
5
|
+
#Gets all persons in pipedrive
|
6
|
+
def self.getAllPersons
|
7
|
+
@start = 0
|
8
|
+
|
9
|
+
table = Array.new
|
10
|
+
@more_items = true
|
11
|
+
tablesize = 0
|
12
|
+
while @more_items == true do
|
13
|
+
count = 0
|
14
|
+
#puts @more_items
|
15
|
+
@base = 'https://api.pipedrive.com/v1/persons?start=' + @start.to_s + '&limit=500&api_token=' + @@key.to_s
|
16
|
+
#puts @base
|
17
|
+
@content = open(@base.to_s).read
|
18
|
+
@parsed = JSON.parse(@content)
|
19
|
+
|
20
|
+
while count < @parsed["data"].size
|
21
|
+
#table.push(@parsed["data"][count])
|
22
|
+
table[tablesize] = @parsed["data"][count]
|
23
|
+
count = count +1
|
24
|
+
tablesize = tablesize + 1
|
25
|
+
end
|
26
|
+
|
27
|
+
@pagination = @parsed['additional_data']['pagination']
|
28
|
+
@more_items = @pagination['more_items_in_collection']
|
29
|
+
#puts @more_items
|
30
|
+
@start = @pagination['next_start']
|
31
|
+
#puts @start
|
32
|
+
end
|
33
|
+
|
34
|
+
return table
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
#Gets details of a signle person with id being passed in at params.
|
40
|
+
def self.detailsOfPerson(id)
|
41
|
+
@base = 'https://api.pipedrive.com/v1/persons/' + id.to_s + '?start=' + @start.to_s + '&limit=500&api_token=' + @@key.to_s
|
42
|
+
@content = open(@base.to_s).read
|
43
|
+
@parsed = JSON.parse(@content)
|
44
|
+
|
45
|
+
end
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module PipedrivePUT
|
2
|
+
class Pipelines
|
3
|
+
|
4
|
+
include PipedrivePUT
|
5
|
+
|
6
|
+
def self.getAllPipelines
|
7
|
+
@start = 0
|
8
|
+
|
9
|
+
table = Array.new
|
10
|
+
@more_items = true
|
11
|
+
tablesize = 0
|
12
|
+
while @more_items == true do
|
13
|
+
count = 0
|
14
|
+
#puts @more_items
|
15
|
+
@base = 'https://api.pipedrive.com/v1/pipelines?api_token=' + @@key.to_s
|
16
|
+
#puts @base
|
17
|
+
@content = open(@base.to_s).read
|
18
|
+
@parsed = JSON.parse(@content)
|
19
|
+
|
20
|
+
while count < @parsed["data"].size
|
21
|
+
#table.push(@parsed["data"][count])
|
22
|
+
table[tablesize] = @parsed["data"][count]
|
23
|
+
count = count +1
|
24
|
+
tablesize = tablesize + 1
|
25
|
+
end
|
26
|
+
|
27
|
+
@pagination = @parsed['additional_data']['pagination']
|
28
|
+
@more_items = @pagination['more_items_in_collection']
|
29
|
+
#puts @more_items
|
30
|
+
@start = @pagination['next_start']
|
31
|
+
#puts @start
|
32
|
+
end
|
33
|
+
|
34
|
+
return table
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.getOnePipeline(id)
|
38
|
+
@base = 'https://api.pipedrive.com/v1/pipelines/' + id.to_s + '?api_token=' + @@key.to_s
|
39
|
+
#puts @base
|
40
|
+
@content = open(@base.to_s).read
|
41
|
+
@parsed = JSON.parse(@content)
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
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.7
|
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
|
11
|
+
date: 2015-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -108,6 +108,8 @@ files:
|
|
108
108
|
- lib/PipedrivePUT.rb
|
109
109
|
- lib/PipedrivePUT/deal.rb
|
110
110
|
- lib/PipedrivePUT/organization.rb
|
111
|
+
- lib/PipedrivePUT/persons.rb
|
112
|
+
- lib/PipedrivePUT/pipelines.rb
|
111
113
|
- lib/PipedrivePUT/search.rb
|
112
114
|
- lib/PipedrivePUT/users.rb
|
113
115
|
- lib/PipedrivePUT/version.rb
|
@@ -131,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
133
|
version: '0'
|
132
134
|
requirements: []
|
133
135
|
rubyforge_project:
|
134
|
-
rubygems_version: 2.4.
|
136
|
+
rubygems_version: 2.4.5
|
135
137
|
signing_key:
|
136
138
|
specification_version: 4
|
137
139
|
summary: Pipedrive gem to retrieve data from Pipedrive.com
|