pipedrive-ruby 0.1.1 → 0.2.0

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.
data/README.rdoc CHANGED
@@ -10,6 +10,17 @@
10
10
  Pipedrive.authenticate( YOUR_API_TOKEN )
11
11
  Pipedrive::Deal.find( DEAL_ID )
12
12
 
13
+ == API Calls
14
+ Pipedrive::Deal.create( params )
15
+ Pipedrive::Deal.find( <ID> )
16
+
17
+ Pipedrive::Organization.create( params )
18
+ Pipedrive::Organization.find( <ID> )
19
+
20
+ Pipdrive::Person.create( params )
21
+ Pipdrive::Person.find( <ID >)
22
+
23
+
13
24
  == Contributing to pipedrive-ruby
14
25
 
15
26
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.2.0
@@ -1,5 +1,7 @@
1
1
  require 'pipedrive/base'
2
2
  require 'pipedrive/deal'
3
+ require 'pipedrive/organization'
4
+ require 'pipedrive/person'
3
5
 
4
6
  module Pipedrive
5
7
 
@@ -0,0 +1,26 @@
1
+ module Pipedrive
2
+
3
+ class Organization < Base
4
+
5
+ def self.create( opts = {} )
6
+ res = post "/organizations", :body => opts
7
+ if res.success?
8
+ res['data'] = opts.merge res['data']
9
+ Organization.new(res)
10
+ else
11
+ bad_response(res)
12
+ end
13
+ end
14
+
15
+ def self.find(id)
16
+ res = get "/organizations/#{id}"
17
+ if res.ok?
18
+ Organization.new(res)
19
+ else
20
+ bad_response(res)
21
+ end
22
+ end
23
+
24
+ end
25
+
26
+ end
@@ -0,0 +1,26 @@
1
+ module Pipedrive
2
+
3
+ class Person < Base
4
+
5
+ def self.create( opts = {} )
6
+ res = post "/persons", :body => opts
7
+ if res.success?
8
+ res['data'] = opts.merge res['data']
9
+ Person.new(res)
10
+ else
11
+ bad_response(res)
12
+ end
13
+ end
14
+
15
+ def self.find(id)
16
+ res = get "/persons/#{id}"
17
+ if res.ok?
18
+ Person.new(res)
19
+ else
20
+ bad_response(res)
21
+ end
22
+ end
23
+
24
+ end
25
+
26
+ end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "pipedrive-ruby"
8
- s.version = "0.1.1"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Waldemar Kusnezow", "Jan Schwenzien", "Patrick Kozma"]
12
- s.date = "2012-11-01"
12
+ s.date = "2012-11-02"
13
13
  s.description = "Ruby wrapper for the Pipedrive API"
14
14
  s.email = "jan@general-scripting.com"
15
15
  s.extra_rdoc_files = [
@@ -25,6 +25,8 @@ Gem::Specification.new do |s|
25
25
  "lib/pipedrive-ruby.rb",
26
26
  "lib/pipedrive/base.rb",
27
27
  "lib/pipedrive/deal.rb",
28
+ "lib/pipedrive/organization.rb",
29
+ "lib/pipedrive/person.rb",
28
30
  "pipedrive-ruby.gemspec",
29
31
  "test/helper.rb",
30
32
  "test/test_pipedrive-rails.rb"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pipedrive-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-11-01 00:00:00.000000000 Z
14
+ date: 2012-11-02 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: httparty
@@ -125,6 +125,8 @@ files:
125
125
  - lib/pipedrive-ruby.rb
126
126
  - lib/pipedrive/base.rb
127
127
  - lib/pipedrive/deal.rb
128
+ - lib/pipedrive/organization.rb
129
+ - lib/pipedrive/person.rb
128
130
  - pipedrive-ruby.gemspec
129
131
  - test/helper.rb
130
132
  - test/test_pipedrive-rails.rb
@@ -143,7 +145,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
143
145
  version: '0'
144
146
  segments:
145
147
  - 0
146
- hash: -866483969921032974
148
+ hash: 3186152852550371805
147
149
  required_rubygems_version: !ruby/object:Gem::Requirement
148
150
  none: false
149
151
  requirements: