PipedrivePUT 1.1.11 → 1.1.12
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 +14 -1
- data/lib/PipedrivePUT.rb +1 -0
- data/lib/PipedrivePUT/recent.rb +15 -0
- data/lib/PipedrivePUT/recents.rb +54 -0
- data/lib/PipedrivePUT/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c05f9009e2af21e0e8d6e11394fe8a90e90c7eba
|
4
|
+
data.tar.gz: c0f8220c4c8a11bc637d5767e96b5e8064c8cb55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3076f8307198bac16354ba4c1bba8fe2f4a86326ca75d25a115be3ff1a6c905fa02ff48932fd2ce71ceef245b8ffd1b7d984dfcbc7f3e173e2545fe6d67528cf
|
7
|
+
data.tar.gz: 7beb16140803dfbb7211ef83c5ea0b04398a9bc35ac3548889053bc97cfd2f55ba1a9e4fcc70f7638e5e4762480ed10653f814f6f1b32ace6582b1ce76e1828f
|
data/README.md
CHANGED
@@ -144,6 +144,17 @@ Get one Pipeline
|
|
144
144
|
PipedrivePUT::Pipelines.getOnePipeline(< id >)
|
145
145
|
```
|
146
146
|
|
147
|
+
## Recents
|
148
|
+
|
149
|
+
Get all Recent changes from Pipedrive based on a specific time
|
150
|
+
```ruby
|
151
|
+
PipedrivePUT::Recents.getRecent(< Time.now >)
|
152
|
+
```
|
153
|
+
|
154
|
+
NOTE: This searches for everything in Pipedrive (deal, organization, user, state, product, etc.)
|
155
|
+
|
156
|
+
I hope to add additional support to break this down at a later time.
|
157
|
+
|
147
158
|
|
148
159
|
Data is returned in JSON format.
|
149
160
|
|
@@ -159,7 +170,9 @@ https://developers.pipedrive.com/v1
|
|
159
170
|
|
160
171
|
1. Add support for additional arguments when creating a deal
|
161
172
|
|
162
|
-
2.
|
173
|
+
2. Add ability to search for recent changes by specific types onle (deal, organization, user, state, etc.)
|
174
|
+
|
175
|
+
3. Many other Pipedrive API Calls
|
163
176
|
|
164
177
|
|
165
178
|
## Contributing
|
data/lib/PipedrivePUT.rb
CHANGED
@@ -0,0 +1,54 @@
|
|
1
|
+
module PipedrivePUT
|
2
|
+
class Recents
|
3
|
+
|
4
|
+
include PipedrivePUT
|
5
|
+
|
6
|
+
require 'rest-client'
|
7
|
+
|
8
|
+
def self.key
|
9
|
+
puts @@key
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
#gets Recent changes from types in Pipedrive
|
14
|
+
def self.getRecent(time)
|
15
|
+
|
16
|
+
if time.nil?
|
17
|
+
raise "No time entered. Correct format is YYYY-MM-DD HH:MM:SS"
|
18
|
+
else
|
19
|
+
@formattedTime = time.strftime("%F %T")
|
20
|
+
puts @formattedTime
|
21
|
+
@start = 0
|
22
|
+
|
23
|
+
table = Array.new
|
24
|
+
@more_items = true
|
25
|
+
tablesize = 0
|
26
|
+
|
27
|
+
while @more_items == true do
|
28
|
+
count = 0
|
29
|
+
puts @more_items
|
30
|
+
@base = 'https://api.pipedrive.com/v1/recents?since_timestamp=' + @formattedTime.to_s + '&' + 'start=' + @start.to_s + '&limit=500&api_token=' + @@key.to_s
|
31
|
+
puts @base
|
32
|
+
@content = open(@base.to_s).read
|
33
|
+
@parsed = JSON.parse(@content)
|
34
|
+
|
35
|
+
while count < @parsed["data"].size
|
36
|
+
table.push(@parsed["data"][count])
|
37
|
+
table[tablesize] = @parsed["data"][count]
|
38
|
+
count = count +1
|
39
|
+
tablesize = tablesize + 1
|
40
|
+
end
|
41
|
+
|
42
|
+
@pagination = @parsed['additional_data']['pagination']
|
43
|
+
@more_items = @pagination['more_items_in_collection']
|
44
|
+
puts @more_items
|
45
|
+
@start = @pagination['next_start']
|
46
|
+
puts @start
|
47
|
+
end
|
48
|
+
|
49
|
+
return table
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
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.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JakePens71
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -110,6 +110,8 @@ files:
|
|
110
110
|
- lib/PipedrivePUT/organization.rb
|
111
111
|
- lib/PipedrivePUT/persons.rb
|
112
112
|
- lib/PipedrivePUT/pipelines.rb
|
113
|
+
- lib/PipedrivePUT/recent.rb
|
114
|
+
- lib/PipedrivePUT/recents.rb
|
113
115
|
- lib/PipedrivePUT/search.rb
|
114
116
|
- lib/PipedrivePUT/users.rb
|
115
117
|
- lib/PipedrivePUT/version.rb
|