frederick_api 0.1.7 → 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.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/lib/frederick_api/configuration.rb +4 -1
- data/lib/frederick_api/v2/business_category.rb +9 -0
- data/lib/frederick_api/v2/public_resource.rb +12 -0
- data/lib/frederick_api/version.rb +1 -1
- data/lib/frederick_api.rb +4 -0
- metadata +4 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: d6ff0a40eec01831507d741f192e4069725eed3d
         | 
| 4 | 
            +
              data.tar.gz: b73d7492fb9ef6663d0d949da42a413cd729c323
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: cad40384ffd14ab4ab6c7e82bce9e28a5df7dae345299f457e85f518503b429b97dde5de198f11bb5160349a2aa00c8c9a6143e55d96b1b295756cec57683a99
         | 
| 7 | 
            +
              data.tar.gz: c86f5bfae286ede2b4e7c615c8a062c105ee7c42ca94f5ee20412b8763ae884cd9d2f77b26a3dfede4e8af8abec1051ef1e55209395f5662709340366861e366
         | 
    
        data/README.md
    CHANGED
    
    | @@ -34,6 +34,7 @@ to configure the Frederick API client. | |
| 34 34 | 
             
            ...
         | 
| 35 35 | 
             
            FrederickAPI.configure do |c|
         | 
| 36 36 | 
             
              c.base_url = 'https://api.hirefrederick.com'
         | 
| 37 | 
            +
              c.public_base_url = 'https://api.public.hirefrederick.com'
         | 
| 37 38 | 
             
              c.api_key = '1234-5678-1234-5678-1234-5678'
         | 
| 38 39 | 
             
            end
         | 
| 39 40 | 
             
            ...
         | 
| @@ -41,10 +42,12 @@ end | |
| 41 42 |  | 
| 42 43 | 
             
            Environment variables can also be used:
         | 
| 43 44 | 
             
              * `FREDERICK_API_BASE_URL`: Same as `base_url` above
         | 
| 45 | 
            +
              * `FREDERICK_API_PUBLIC_BASE_URL`: Same as `public_base_url` above
         | 
| 44 46 | 
             
              * `FREDERICK_API_KEY`: Same as `api_key` above
         | 
| 45 47 |  | 
| 46 48 | 
             
            Environments:
         | 
| 47 49 | 
             
              * For testing (default), use `FREDERICK_API_BASE_URL = https://api.staging.hirefrederick.com`
         | 
| 50 | 
            +
              and `FREDERICK_API_PUBLIC_BASE_URL = https://api.public.staging.hirefrederick.com`
         | 
| 48 51 | 
             
              * For production, use `FREDERICK_API_BASE_URL = https://api.hirefrederick.com`
         | 
| 49 52 |  | 
| 50 53 | 
             
            NOTE: You must specify the production base URL of `https://api.hirefrederick.com` in order to use this gem with
         | 
| @@ -13,13 +13,16 @@ module FrederickAPI # :nodoc: | |
| 13 13 | 
             
                DEFAULTS = {
         | 
| 14 14 | 
             
                  base_url: ENV['FREDERICK_API_BASE_URL'] ||
         | 
| 15 15 | 
             
                    'https://api.staging.hirefrederick.com',
         | 
| 16 | 
            +
                  public_base_url: ENV['FREDERICK_API_PUBLIC_BASE_URL'] ||
         | 
| 17 | 
            +
                    'https://api.public.staging.hirefrederick.com',
         | 
| 16 18 | 
             
                  api_key: ENV['FREDERICK_API_KEY']
         | 
| 17 19 | 
             
                }.freeze
         | 
| 18 20 |  | 
| 19 | 
            -
                attr_accessor :base_url, :api_key
         | 
| 21 | 
            +
                attr_accessor :base_url, :public_base_url, :api_key
         | 
| 20 22 |  | 
| 21 23 | 
             
                def initialize
         | 
| 22 24 | 
             
                  @base_url = DEFAULTS[:base_url]
         | 
| 25 | 
            +
                  @public_base_url = DEFAULTS[:public_base_url]
         | 
| 23 26 | 
             
                  @api_key = DEFAULTS[:api_key]
         | 
| 24 27 | 
             
                end
         | 
| 25 28 | 
             
              end
         | 
    
        data/lib/frederick_api.rb
    CHANGED
    
    | @@ -10,10 +10,14 @@ require 'frederick_api/v2/helpers/paginator' | |
| 10 10 | 
             
            require 'frederick_api/v2/helpers/query_builder'
         | 
| 11 11 | 
             
            require 'frederick_api/v2/helpers/requestor'
         | 
| 12 12 | 
             
            require 'frederick_api/v2/resource'
         | 
| 13 | 
            +
            require 'frederick_api/v2/public_resource'
         | 
| 13 14 |  | 
| 14 15 | 
             
            require 'frederick_api/v2/user'
         | 
| 15 16 | 
             
            require 'frederick_api/v2/location'
         | 
| 16 17 |  | 
| 18 | 
            +
            # Public resources
         | 
| 19 | 
            +
            require 'frederick_api/v2/business_category'
         | 
| 20 | 
            +
             | 
| 17 21 | 
             
            # Froldoex resources
         | 
| 18 22 | 
             
            require 'frederick_api/v2/contact'
         | 
| 19 23 | 
             
            require 'frederick_api/v2/contact_property'
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: frederick_api
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.2.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Frederick Engineering
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2017- | 
| 11 | 
            +
            date: 2017-09-05 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: json_api_client
         | 
| @@ -35,6 +35,7 @@ files: | |
| 35 35 | 
             
            - README.md
         | 
| 36 36 | 
             
            - lib/frederick_api.rb
         | 
| 37 37 | 
             
            - lib/frederick_api/configuration.rb
         | 
| 38 | 
            +
            - lib/frederick_api/v2/business_category.rb
         | 
| 38 39 | 
             
            - lib/frederick_api/v2/contact.rb
         | 
| 39 40 | 
             
            - lib/frederick_api/v2/contact_list.rb
         | 
| 40 41 | 
             
            - lib/frederick_api/v2/contact_property.rb
         | 
| @@ -44,6 +45,7 @@ files: | |
| 44 45 | 
             
            - lib/frederick_api/v2/helpers/requestor.rb
         | 
| 45 46 | 
             
            - lib/frederick_api/v2/interaction.rb
         | 
| 46 47 | 
             
            - lib/frederick_api/v2/location.rb
         | 
| 48 | 
            +
            - lib/frederick_api/v2/public_resource.rb
         | 
| 47 49 | 
             
            - lib/frederick_api/v2/resource.rb
         | 
| 48 50 | 
             
            - lib/frederick_api/v2/user.rb
         | 
| 49 51 | 
             
            - lib/frederick_api/version.rb
         |