PipedrivePUT 1.1.16 → 1.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/lib/PipedrivePUT/organization.rb +5 -8
- data/lib/PipedrivePUT/persons.rb +6 -16
- 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: 5dc4615285378436a3a121a413cc48765570be01
|
4
|
+
data.tar.gz: d9a654fd7575993202f0b95455f450910cc72a65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0adbe1f8908d5fb30eca26ad6254ad60885311c2e93af2afe8e454501bd11afe426b9b3355abe534ace3af3586ce921bc3598cf14c9daa18fc1a510a7e8bc11
|
7
|
+
data.tar.gz: 39afd5b3365c0013a299fb2a815db92a58dd330f5b5eea8cab40a6a618c2eeb528ffa7be06eacee54a596e1d2eb7b0c57852b9c2a054bd9d9e7d164e4d301358
|
data/README.md
CHANGED
@@ -26,7 +26,9 @@ Or install it yourself as:
|
|
26
26
|
|
27
27
|
## Usage
|
28
28
|
|
29
|
+
```ruby
|
29
30
|
PipedrivePUT.key(< API Token Here >)
|
31
|
+
```
|
30
32
|
|
31
33
|
## Organizations
|
32
34
|
|
@@ -160,6 +162,12 @@ Example:
|
|
160
162
|
|
161
163
|
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.
|
162
164
|
|
165
|
+
Delete a persons from Pipedrive
|
166
|
+
|
167
|
+
```ruby
|
168
|
+
PipedrivePUT::Persons.deletePerson(< id >)
|
169
|
+
```
|
170
|
+
|
163
171
|
|
164
172
|
## Pipelines
|
165
173
|
|
@@ -56,9 +56,6 @@ require 'rest-client'
|
|
56
56
|
|
57
57
|
response = Net::HTTP.post_form(uri, options)
|
58
58
|
end
|
59
|
-
|
60
|
-
|
61
|
-
|
62
59
|
end
|
63
60
|
|
64
61
|
#Return data of a specific Organization
|
@@ -143,18 +140,18 @@ require 'rest-client'
|
|
143
140
|
def self.updateOrganization(id, options = {})
|
144
141
|
@url = 'https://api.pipedrive.com/v1/organizations/' + id.to_s + '?api_token=' + @@key.to_s
|
145
142
|
|
146
|
-
puts @url
|
143
|
+
#puts @url
|
147
144
|
|
148
145
|
if (!options.nil?)
|
149
146
|
|
150
147
|
options.merge!(:id => id)
|
151
|
-
puts options
|
148
|
+
#puts options
|
152
149
|
|
153
|
-
puts '----------------------'
|
150
|
+
#puts '----------------------'
|
154
151
|
|
155
152
|
response = HTTParty.put(@url.to_s, :body => options.to_json, :headers => {'Content-type' => 'application/json'})
|
156
|
-
puts '----------------------'
|
157
|
-
puts response
|
153
|
+
#puts '----------------------'
|
154
|
+
#puts response
|
158
155
|
|
159
156
|
end
|
160
157
|
|
data/lib/PipedrivePUT/persons.rb
CHANGED
@@ -47,12 +47,11 @@ require 'httparty'
|
|
47
47
|
|
48
48
|
end
|
49
49
|
|
50
|
-
|
51
50
|
#Add an Person
|
52
51
|
def self.addPerson(name, options = {})
|
53
52
|
#args.each_with_index{ |arg, i| puts "#{i+1}. #{arg}" }
|
54
53
|
|
55
|
-
|
54
|
+
@url = 'https://api.pipedrive.com/v1/persons?api_token=' + @@key.to_s
|
56
55
|
|
57
56
|
if (!options.nil?)
|
58
57
|
|
@@ -60,25 +59,16 @@ require 'httparty'
|
|
60
59
|
|
61
60
|
puts options
|
62
61
|
|
63
|
-
response =
|
62
|
+
response = HTTParty.post(@url.to_s, :body => options.to_json, :headers => {'Content-type' => 'application/json'})
|
64
63
|
end
|
65
64
|
end
|
66
65
|
|
66
|
+
#Delete a person from Pipedrive
|
67
|
+
def self.deletePerson(id)
|
67
68
|
|
68
|
-
|
69
|
-
def self.addPerson(name, options = {})
|
70
|
-
#args.each_with_index{ |arg, i| puts "#{i+1}. #{arg}" }
|
71
|
-
|
72
|
-
@url = 'https://api.pipedrive.com/v1/persons?api_token=' + @@key.to_s
|
73
|
-
|
74
|
-
if (!options.nil?)
|
75
|
-
|
76
|
-
options.merge!(:name => name)
|
77
|
-
|
78
|
-
puts options
|
69
|
+
@url = 'https://api.pipedrive.com/v1/persons/' + id.to_s + '?api_token=' + @@key.to_s
|
79
70
|
|
80
|
-
|
81
|
-
end
|
71
|
+
response = HTTParty.delete(@url.to_s)
|
82
72
|
end
|
83
73
|
|
84
74
|
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.17
|
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-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|