PipedrivePUT 1.1.16 → 1.1.17

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 600c7a1f3f2c3591c105bbf01e07635eec61ef50
4
- data.tar.gz: e7d09d60883ff6adf06d8296acb016bf37b46e4b
3
+ metadata.gz: 5dc4615285378436a3a121a413cc48765570be01
4
+ data.tar.gz: d9a654fd7575993202f0b95455f450910cc72a65
5
5
  SHA512:
6
- metadata.gz: e1ed196dbeab441c6953dc11f36d24cdb48fadb6981f945082f21fcc3241e7be5cd7147be86d3656847fe735a513f9c77afd2643e55b210080097b2cc557d0ba
7
- data.tar.gz: fbcb2366e6a36a81fa395d241115cb8c1fa8ef52e63bcf36d8768d3ec92397520ae3556094be24282542f6f4206d514fe089a776ff68a6e03096808fd416a924
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
 
@@ -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
- uri = URI.parse('https://api.pipedrive.com/v1/persons?api_token=' + @@key.to_s)
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 = Net::HTTP.post_form(uri, options)
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
- #Add an Person
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
- response = HTTParty.post(@url.to_s, :body => options.to_json, :headers => {'Content-type' => 'application/json'})
81
- end
71
+ response = HTTParty.delete(@url.to_s)
82
72
  end
83
73
 
84
74
  end
@@ -1,3 +1,3 @@
1
1
  module PipedrivePUT
2
- VERSION = "1.1.16"
2
+ VERSION = "1.1.17"
3
3
  end
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.16
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-22 00:00:00.000000000 Z
11
+ date: 2015-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler