pipedrive_api 0.1.9 → 0.1.10
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 +3 -0
- data/Rakefile +4 -0
- data/lib/pipedrive_api/search_result.rb +15 -0
- data/lib/pipedrive_api/version.rb +1 -1
- data/lib/pipedrive_api.rb +1 -0
- metadata +2 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 976bed1dee57bac2eda42b326af89b28f0df9f3e
         | 
| 4 | 
            +
              data.tar.gz: 212a0c2c345f6e56d580fc45c37457758bcaa9c5
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: f51243cfaab0b87d6800979f3ece46808a821ebc605de5923e17d8ed667fd43f83c58e08de9dd7ea672c7560eb594692f16850c262c08608907d0685f4533fef
         | 
| 7 | 
            +
              data.tar.gz: 3db9aca16140d885328c0c2b6dedf41fdca1d2818215e4a92c34bc008d91046c355a05adceae2b88fff841919b2e5f015b7ba5c86e0fa842c31a18eb9d2a9896
         | 
    
        data/README.md
    CHANGED
    
    | @@ -55,6 +55,9 @@ PipedriveAPI::Person.update(<id>, <params>) | |
| 55 55 | 
             
            PipedriveAPI::Organisation.update(<id>, <params>)
         | 
| 56 56 | 
             
            PipedriveAPI::Pipeline.update(<id>, <params>)
         | 
| 57 57 | 
             
            PipedriveAPI::Product.update(<id>, <params>)
         | 
| 58 | 
            +
             | 
| 59 | 
            +
            # Find record by field term
         | 
| 60 | 
            +
            PipedriveAPI::SearchResult.by_field(<term>, <field_type>, <field_key>, <exact_match>, <params>)
         | 
| 58 61 | 
             
            ```
         | 
| 59 62 |  | 
| 60 63 | 
             
            ## Development
         | 
    
        data/Rakefile
    CHANGED
    
    
| @@ -0,0 +1,15 @@ | |
| 1 | 
            +
            module PipedriveAPI
         | 
| 2 | 
            +
              class SearchResult < Base
         | 
| 3 | 
            +
             | 
| 4 | 
            +
                class << self
         | 
| 5 | 
            +
             | 
| 6 | 
            +
                  def by_field(term, field_type, field_key, exact_match=true, **params)
         | 
| 7 | 
            +
                    query = { term: term, field_type: field_type, field_key: field_key, exact_match: exact_match, return_item_ids: true }
         | 
| 8 | 
            +
                    response = get "#{resource_path}/field", query: query.merge(params)
         | 
| 9 | 
            +
                    handle response
         | 
| 10 | 
            +
                  end
         | 
| 11 | 
            +
             | 
| 12 | 
            +
                end
         | 
| 13 | 
            +
             | 
| 14 | 
            +
              end
         | 
| 15 | 
            +
            end
         | 
    
        data/lib/pipedrive_api.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: pipedrive_api
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.10
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - gareth
         | 
| @@ -106,6 +106,7 @@ files: | |
| 106 106 | 
             
            - lib/pipedrive_api/person_field.rb
         | 
| 107 107 | 
             
            - lib/pipedrive_api/pipeline.rb
         | 
| 108 108 | 
             
            - lib/pipedrive_api/product.rb
         | 
| 109 | 
            +
            - lib/pipedrive_api/search_result.rb
         | 
| 109 110 | 
             
            - lib/pipedrive_api/stage.rb
         | 
| 110 111 | 
             
            - lib/pipedrive_api/version.rb
         | 
| 111 112 | 
             
            - pipedrive_api.gemspec
         |