PipedrivePUT 1.1.13 → 1.1.14
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 +22 -1
 - data/lib/PipedrivePUT/persons.rb +35 -0
 - data/lib/PipedrivePUT/version.rb +1 -1
 - metadata +17 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: a879794d5358edde4dde3e4c42e90fb0f48fe1c9
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 21e6068a1780203ab7406b90e764ff428a78addd
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: d486e3d9eef7f028e6600d433ee8b81af7d354dcabfe4c75958c8d84074986bd51f54e9a53c8b87f65051abce773c60faaf43b528b080b9bbee767b74e34c0c5
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 0e1c6c9fe3197441792121bf1e06d6384db2d440c6b9cb1d36ed2d33cc79272b4e652e3e14a58db71e23894964eecd9d3961c7dd73241cba432eba6163843bfe
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -10,6 +10,12 @@ Add this line to your application's Gemfile: 
     | 
|
| 
       10 
10 
     | 
    
         
             
            gem 'PipedrivePUT'
         
     | 
| 
       11 
11 
     | 
    
         
             
            ```
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
      
 13 
     | 
    
         
            +
            #Needed for some http commands.
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 16 
     | 
    
         
            +
            gem 'httparty'
         
     | 
| 
      
 17 
     | 
    
         
            +
            ```
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
       13 
19 
     | 
    
         
             
            And then execute:
         
     | 
| 
       14 
20 
     | 
    
         | 
| 
       15 
21 
     | 
    
         
             
                $ bundle
         
     | 
| 
         @@ -102,7 +108,7 @@ Search entire Pipedrive (Deals, Organizations, Product, File, Person) 
     | 
|
| 
       102 
108 
     | 
    
         
             
            Search Specific Item type in Pipedrive (Deals, Organizations, Product, File, Person)
         
     | 
| 
       103 
109 
     | 
    
         | 
| 
       104 
110 
     | 
    
         
             
            ```ruby
         
     | 
| 
       105 
     | 
    
         
            -
              PipedrivePUT::Search.search(< Term >, < item_type>)
         
     | 
| 
      
 111 
     | 
    
         
            +
              PipedrivePUT::Search.search(< Term >, < item_type >)
         
     | 
| 
       106 
112 
     | 
    
         
             
            ```
         
     | 
| 
       107 
113 
     | 
    
         | 
| 
       108 
114 
     | 
    
         
             
            Example:
         
     | 
| 
         @@ -132,6 +138,21 @@ Get specifi Person from Pipedrive 
     | 
|
| 
       132 
138 
     | 
    
         
             
              PipedrivePUT::Persons.detailsOfPerson(< id >)
         
     | 
| 
       133 
139 
     | 
    
         
             
            ```
         
     | 
| 
       134 
140 
     | 
    
         | 
| 
      
 141 
     | 
    
         
            +
            Add a person to Pipedrive
         
     | 
| 
      
 142 
     | 
    
         
            +
             
     | 
| 
      
 143 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 144 
     | 
    
         
            +
              PipedrivePUT::Persons.addPerson(< Name of Person >, < additional params >)
         
     | 
| 
      
 145 
     | 
    
         
            +
            ```s
         
     | 
| 
      
 146 
     | 
    
         
            +
             
     | 
| 
      
 147 
     | 
    
         
            +
            Example:
         
     | 
| 
      
 148 
     | 
    
         
            +
             
     | 
| 
      
 149 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 150 
     | 
    
         
            +
              PipedrivePUT::Persons.addPerson("Programming Test Person", {:org_id => 15367, :phone => [{:value=>'555-555-3340',:label=>'work'},{:value=>'555-111-1111',:label=>'home'}]})
         
     | 
| 
      
 151 
     | 
    
         
            +
            ```s
         
     | 
| 
      
 152 
     | 
    
         
            +
             
     | 
| 
      
 153 
     | 
    
         
            +
            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.
         
     | 
| 
      
 154 
     | 
    
         
            +
             
     | 
| 
      
 155 
     | 
    
         
            +
             
     | 
| 
       135 
156 
     | 
    
         
             
            ## Pipelines
         
     | 
| 
       136 
157 
     | 
    
         | 
| 
       137 
158 
     | 
    
         
             
            Get all Pipelines
         
     | 
    
        data/lib/PipedrivePUT/persons.rb
    CHANGED
    
    | 
         @@ -1,4 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            module PipedrivePUT
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            require 'httparty'
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
       2 
5 
     | 
    
         
             
            	class Persons
         
     | 
| 
       3 
6 
     | 
    
         
             
            		include PipedrivePUT
         
     | 
| 
       4 
7 
     | 
    
         | 
| 
         @@ -45,6 +48,38 @@ module PipedrivePUT 
     | 
|
| 
       45 
48 
     | 
    
         
             
            		end
         
     | 
| 
       46 
49 
     | 
    
         | 
| 
       47 
50 
     | 
    
         | 
| 
      
 51 
     | 
    
         
            +
            		#Add an Person
         
     | 
| 
      
 52 
     | 
    
         
            +
            			def self.addPerson(name, options = {})
         
     | 
| 
      
 53 
     | 
    
         
            +
            				#args.each_with_index{ |arg, i| puts "#{i+1}. #{arg}" } 
         
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
      
 55 
     | 
    
         
            +
            				uri = URI.parse('https://api.pipedrive.com/v1/persons?api_token=' + @@key.to_s)
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
            				if (!options.nil?)
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
            					options.merge!(:name => name)
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
            					puts options
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
            					response = Net::HTTP.post_form(uri, options)
         
     | 
| 
      
 64 
     | 
    
         
            +
            				end
         
     | 
| 
      
 65 
     | 
    
         
            +
            			end
         
     | 
| 
      
 66 
     | 
    
         
            +
             
     | 
| 
      
 67 
     | 
    
         
            +
             
     | 
| 
      
 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
         
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
| 
      
 80 
     | 
    
         
            +
            					response = HTTParty.post(@url.to_s, :body => options.to_json, :headers => {'Content-type' => 'application/json'})
         
     | 
| 
      
 81 
     | 
    
         
            +
            				end
         
     | 
| 
      
 82 
     | 
    
         
            +
            			end
         
     | 
| 
       48 
83 
     | 
    
         | 
| 
       49 
84 
     | 
    
         
             
            	end
         
     | 
| 
       50 
85 
     | 
    
         | 
    
        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.14
         
     | 
| 
       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-10 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     | 
| 
         @@ -94,6 +94,20 @@ dependencies: 
     | 
|
| 
       94 
94 
     | 
    
         
             
                - - ">="
         
     | 
| 
       95 
95 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       96 
96 
     | 
    
         
             
                    version: 1.0.7
         
     | 
| 
      
 97 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 98 
     | 
    
         
            +
              name: httparty
         
     | 
| 
      
 99 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 100 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 101 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 102 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 103 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 104 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 105 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 106 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 107 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 108 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 109 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 110 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       97 
111 
     | 
    
         
             
            description: Pipedrive gem supports a small amount of functionality at the moment.
         
     | 
| 
       98 
112 
     | 
    
         
             
              Will add more when I can.
         
     | 
| 
       99 
113 
     | 
    
         
             
            email:
         
     | 
| 
         @@ -134,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       134 
148 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       135 
149 
     | 
    
         
             
            requirements: []
         
     | 
| 
       136 
150 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       137 
     | 
    
         
            -
            rubygems_version: 2.4. 
     | 
| 
      
 151 
     | 
    
         
            +
            rubygems_version: 2.4.6
         
     | 
| 
       138 
152 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       139 
153 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       140 
154 
     | 
    
         
             
            summary: Pipedrive gem to retrieve data from Pipedrive.com
         
     |