connect_wise_web_reports 0.4.0 → 0.5.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
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: fba094c3921d23c2f6e5f9cd4179d42f135e19d0
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 6309d2836c13bbc40778e5743a7647ad486f0ab0
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 999039c30e92479ce1783067dfdd68541250487efeea5c56f1f569379e96de008a58418e0714c4fb1cfbf0845d4d6ae4fcf0abde27b3524de4496521d59647f2
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: aabb6ce71f94186eed91d981ccd2e6f5fbe85118889debdc0c30767d68d46134cc2903cc79d16c5cff163ce49e2573f2535c49d40e5482e138be2d5c6ca4d8d5
         
     | 
| 
         @@ -10,33 +10,35 @@ module ConnectWiseWebReports 
     | 
|
| 
       10 
10 
     | 
    
         
             
                # @param options [Hash]
         
     | 
| 
       11 
11 
     | 
    
         
             
                # @return [String]
         
     | 
| 
       12 
12 
     | 
    
         
             
                def self.url(name, options = {})
         
     | 
| 
       13 
     | 
    
         
            -
                  url = "https://#{options[:host]}/#{options[:version]}/webreport/"
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
13 
     | 
    
         
             
                  # Report
         
     | 
| 
       16 
     | 
    
         
            -
                   
     | 
| 
      
 14 
     | 
    
         
            +
                  params = "r=#{name}"
         
     | 
| 
       17 
15 
     | 
    
         | 
| 
       18 
16 
     | 
    
         
             
                  # API credentials
         
     | 
| 
       19 
     | 
    
         
            -
                   
     | 
| 
       20 
     | 
    
         
            -
                   
     | 
| 
       21 
     | 
    
         
            -
                   
     | 
| 
      
 17 
     | 
    
         
            +
                  params += "&c=#{options[:company_id].to_s}"
         
     | 
| 
      
 18 
     | 
    
         
            +
                  params += "&u=#{options[:integrator_id].to_s}"
         
     | 
| 
      
 19 
     | 
    
         
            +
                  params += "&p=#{options[:integrator_password].to_s}"
         
     | 
| 
       22 
20 
     | 
    
         | 
| 
       23 
21 
     | 
    
         
             
                  #order
         
     | 
| 
       24 
     | 
    
         
            -
                   
     | 
| 
      
 22 
     | 
    
         
            +
                  params += "&o=#{options[:order_by].to_s}" unless options[:order_by].nil?
         
     | 
| 
       25 
23 
     | 
    
         | 
| 
       26 
24 
     | 
    
         
             
                  # pagination
         
     | 
| 
       27 
     | 
    
         
            -
                   
     | 
| 
       28 
     | 
    
         
            -
                   
     | 
| 
      
 25 
     | 
    
         
            +
                  params += "&l=#{options[:limit].to_s}" unless options[:limit].nil?
         
     | 
| 
      
 26 
     | 
    
         
            +
                  params += "&s=#{options[:skip].to_s}" unless options[:skip].nil?
         
     | 
| 
       29 
27 
     | 
    
         | 
| 
       30 
28 
     | 
    
         
             
                  # timeout
         
     | 
| 
       31 
     | 
    
         
            -
                   
     | 
| 
      
 29 
     | 
    
         
            +
                  params += "&t=#{options[:timeout].to_s}" unless options[:timeout].nil?
         
     | 
| 
       32 
30 
     | 
    
         | 
| 
       33 
31 
     | 
    
         
             
                  # fields
         
     | 
| 
       34 
     | 
    
         
            -
                   
     | 
| 
      
 32 
     | 
    
         
            +
                  params += "&f=#{options[:fields].join('&f=')}" unless options[:fields].nil? || options[:fields].empty?
         
     | 
| 
       35 
33 
     | 
    
         | 
| 
       36 
34 
     | 
    
         
             
                  # conditions
         
     | 
| 
       37 
     | 
    
         
            -
                   
     | 
| 
      
 35 
     | 
    
         
            +
                  params += "&q=#{CGI.escape(options[:conditions])}" unless options[:conditions].blank?
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
                  url = "https://#{options[:host]}/#{options[:version]}/webreport/?#{params}"
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
                  ConnectWiseWebReports.logger.info url
         
     | 
| 
       38 
40 
     | 
    
         | 
| 
       39 
     | 
    
         
            -
                  return  
     | 
| 
      
 41 
     | 
    
         
            +
                  return url
         
     | 
| 
       40 
42 
     | 
    
         
             
                end
         
     | 
| 
       41 
43 
     | 
    
         | 
| 
       42 
44 
     | 
    
         
             
                def initialize(name, options = {})
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: connect_wise_web_reports
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.5.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Kevin Pheasey
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2016- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2016-11-03 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     | 
| 
         @@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       133 
133 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       134 
134 
     | 
    
         
             
            requirements: []
         
     | 
| 
       135 
135 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       136 
     | 
    
         
            -
            rubygems_version: 2.5. 
     | 
| 
      
 136 
     | 
    
         
            +
            rubygems_version: 2.5.1
         
     | 
| 
       137 
137 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       138 
138 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       139 
139 
     | 
    
         
             
            summary: Connect Wise Web Reports API Wrapper
         
     |