bwapi 4.0.2 → 4.0.3.pre.158
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 +13 -5
 - data/.gitignore +1 -0
 - data/Gemfile +0 -1
 - data/bwapi.gemspec +1 -1
 - data/lib/bwapi/client/projects/data.rb +5 -35
 - data/lib/bwapi/client/projects/data/mentions.rb +67 -0
 - data/lib/bwapi/client/projects/data/volume.rb +23 -0
 - data/lib/bwapi/version.rb +1 -1
 - metadata +7 -6
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,15 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
      
 2 
     | 
    
         
            +
            !binary "U0hBMQ==":
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: !binary |-
         
     | 
| 
      
 4 
     | 
    
         
            +
                OTE1ZmU3MzU2NjA2ZTE0NDdlNThjYWMzYTJhNWQyODRhNTQ3MTZjMQ==
         
     | 
| 
      
 5 
     | 
    
         
            +
              data.tar.gz: !binary |-
         
     | 
| 
      
 6 
     | 
    
         
            +
                NjMxNmM1YjBlNTU4YzdjMzNmY2Q5NTRiMWMzY2FlOTdhMTMyYTcwYg==
         
     | 
| 
       5 
7 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
      
 8 
     | 
    
         
            +
              metadata.gz: !binary |-
         
     | 
| 
      
 9 
     | 
    
         
            +
                MDU1ZWYyMDFkZTZiOGM2ZmVjYzIzMjc5MjFiOGEyMmFmOTNhYTY0ZGNlNTRh
         
     | 
| 
      
 10 
     | 
    
         
            +
                NWJkNzg4MzQ1YjA3OWNkMjBlODA4Zjc2OTVjODRkYjMwYzNkMjBhNmIwNmM2
         
     | 
| 
      
 11 
     | 
    
         
            +
                M2IyNjg1MzI5NDg5MzJiYzNhNjljYmE4YzUyZWRjMTE4Yzk0YjM=
         
     | 
| 
      
 12 
     | 
    
         
            +
              data.tar.gz: !binary |-
         
     | 
| 
      
 13 
     | 
    
         
            +
                MTM4ZDE1MzJmZjYzMGU4MGIxYWU5YmM4YzFiY2JiYmNmYjk5ODhmNzhmMzAw
         
     | 
| 
      
 14 
     | 
    
         
            +
                MWE4MGZjY2IzOWU4YjAxODU3ZDhhMzgwMDY5MzZlNzYxNjhmZGM2NjMxYmEx
         
     | 
| 
      
 15 
     | 
    
         
            +
                MDI5YmU1MGM4YjQ2MzFkN2IyZTM4ZDFkNTUzZDAzNGIxM2U3ZDI=
         
     | 
    
        data/.gitignore
    CHANGED
    
    
    
        data/Gemfile
    CHANGED
    
    
    
        data/bwapi.gemspec
    CHANGED
    
    | 
         @@ -4,7 +4,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       4 
4 
     | 
    
         
             
              s.name        = 'bwapi'
         
     | 
| 
       5 
5 
     | 
    
         
             
              s.version     = BWAPI::VERSION
         
     | 
| 
       6 
6 
     | 
    
         
             
              s.version     = BWAPI::VERSION + ".pre.#{ENV['TRAVIS_BUILD_NUMBER']}" if ENV['TRAVIS']
         
     | 
| 
       7 
     | 
    
         
            -
              s.date        = '2014-01- 
     | 
| 
      
 7 
     | 
    
         
            +
              s.date        = '2014-01-29'
         
     | 
| 
       8 
8 
     | 
    
         
             
              s.summary     = 'Brandwatch API Wrapper'
         
     | 
| 
       9 
9 
     | 
    
         
             
              s.description = 'A Ruby wrapper for the Brandwatch API'
         
     | 
| 
       10 
10 
     | 
    
         
             
              s.author      = 'Jonathan Chrisp'
         
     | 
| 
         @@ -1,3 +1,6 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'bwapi/client/projects/data/mentions'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'bwapi/client/projects/data/volume'
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
       1 
4 
     | 
    
         
             
            module BWAPI
         
     | 
| 
       2 
5 
     | 
    
         
             
              class Client
         
     | 
| 
       3 
6 
     | 
    
         
             
                module Projects
         
     | 
| 
         @@ -18,41 +21,8 @@ module BWAPI 
     | 
|
| 
       18 
21 
     | 
    
         
             
                      get "projects/#{project_id}/data/#{aggregate}/#{dimension_one}/#{dimension_two}", opts
         
     | 
| 
       19 
22 
     | 
    
         
             
                    end
         
     | 
| 
       20 
23 
     | 
    
         | 
| 
       21 
     | 
    
         
            -
                     
     | 
| 
       22 
     | 
    
         
            -
                     
     | 
| 
       23 
     | 
    
         
            -
                    # @param project_id [Integer] Id of project
         
     | 
| 
       24 
     | 
    
         
            -
                    # @param opts [Hash] options hash of parameters
         
     | 
| 
       25 
     | 
    
         
            -
                    # @option opts [Hash] filter The filters to apply
         
     | 
| 
       26 
     | 
    
         
            -
                    # @option opts [Array] dateRanges Date range ids
         
     | 
| 
       27 
     | 
    
         
            -
                    # @return [Hashie::Mash] All Chart data mentions
         
     | 
| 
       28 
     | 
    
         
            -
                    def data_date_ranges_days project_id, opts={}
         
     | 
| 
       29 
     | 
    
         
            -
                      get "projects/#{project_id}/data/volume/dataRanges/days", opts
         
     | 
| 
       30 
     | 
    
         
            -
                    end
         
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
                    # Get mentions that fall within the submitted filters
         
     | 
| 
       33 
     | 
    
         
            -
                    #
         
     | 
| 
       34 
     | 
    
         
            -
                    # @param project_id [Integer] Id of project
         
     | 
| 
       35 
     | 
    
         
            -
                    # @param opts [Hash] options hash of parameters
         
     | 
| 
       36 
     | 
    
         
            -
                    # @option opts [Hash] filter The filters to apply
         
     | 
| 
       37 
     | 
    
         
            -
                    # @option opts [Integer] page Page of projects to retrieve
         
     | 
| 
       38 
     | 
    
         
            -
                    # @option opts [Integer] pageSize Results per page of results
         
     | 
| 
       39 
     | 
    
         
            -
                    # @option opts [String] :orderBy Parameter to sort by
         
     | 
| 
       40 
     | 
    
         
            -
                    # @option opts [String] :orderDirection Direction of sort
         
     | 
| 
       41 
     | 
    
         
            -
                    # @option opts [Integer] :orderByCategory Category to sort by when orderBy category
         
     | 
| 
       42 
     | 
    
         
            -
                    # @return [Hashie::Mash] All Mentions
         
     | 
| 
       43 
     | 
    
         
            -
                    def data_mentions project_id, opts={}
         
     | 
| 
       44 
     | 
    
         
            -
                      get "projects/#{project_id}/data/mentions", opts
         
     | 
| 
       45 
     | 
    
         
            -
                    end
         
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
       47 
     | 
    
         
            -
                    # Update mentions for project
         
     | 
| 
       48 
     | 
    
         
            -
                    #
         
     | 
| 
       49 
     | 
    
         
            -
                    # @param project_id [Integer] Id of project
         
     | 
| 
       50 
     | 
    
         
            -
                    # @param opts [Hash] options hash of parameters
         
     | 
| 
       51 
     | 
    
         
            -
                    # @option opts [Hash] List The patches to be applied
         
     | 
| 
       52 
     | 
    
         
            -
                    # @return [Hashie::Mash] Updated mentions
         
     | 
| 
       53 
     | 
    
         
            -
                    def update_data_mentions project_id, opts={}
         
     | 
| 
       54 
     | 
    
         
            -
                      patch "projects/#{project_id}/data/mentions", opts
         
     | 
| 
       55 
     | 
    
         
            -
                    end
         
     | 
| 
      
 24 
     | 
    
         
            +
                    include BWAPI::Client::Projects::Data::Mentions
         
     | 
| 
      
 25 
     | 
    
         
            +
                    include BWAPI::Client::Projects::Data::Volume
         
     | 
| 
       56 
26 
     | 
    
         | 
| 
       57 
27 
     | 
    
         
             
                  end
         
     | 
| 
       58 
28 
     | 
    
         
             
                end
         
     | 
| 
         @@ -0,0 +1,67 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module BWAPI
         
     | 
| 
      
 2 
     | 
    
         
            +
              class Client
         
     | 
| 
      
 3 
     | 
    
         
            +
                module Projects
         
     | 
| 
      
 4 
     | 
    
         
            +
                  module Data
         
     | 
| 
      
 5 
     | 
    
         
            +
                    # Mentions module for projects/data/mentions endpoints
         
     | 
| 
      
 6 
     | 
    
         
            +
                    module Mentions
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                      # Get mentions that fall within the submitted filters
         
     | 
| 
      
 9 
     | 
    
         
            +
                      #
         
     | 
| 
      
 10 
     | 
    
         
            +
                      # @param project_id [Integer] Id of project
         
     | 
| 
      
 11 
     | 
    
         
            +
                      # @param opts [Hash] options hash of parameters
         
     | 
| 
      
 12 
     | 
    
         
            +
                      # @option opts [Hash] filter The filters to apply
         
     | 
| 
      
 13 
     | 
    
         
            +
                      # @option opts [Integer] page Page of projects to retrieve
         
     | 
| 
      
 14 
     | 
    
         
            +
                      # @option opts [Integer] pageSize Results per page of results
         
     | 
| 
      
 15 
     | 
    
         
            +
                      # @option opts [String] orderBy Parameter to sort by
         
     | 
| 
      
 16 
     | 
    
         
            +
                      # @option opts [String] orderDirection Direction of sort
         
     | 
| 
      
 17 
     | 
    
         
            +
                      # @option opts [Integer] orderByCategory Category to sort by when orderBy category
         
     | 
| 
      
 18 
     | 
    
         
            +
                      # @return [Hashie::Mash] All Mentions
         
     | 
| 
      
 19 
     | 
    
         
            +
                      def data_mentions project_id, opts={}
         
     | 
| 
      
 20 
     | 
    
         
            +
                        get "projects/#{project_id}/data/mentions", opts
         
     | 
| 
      
 21 
     | 
    
         
            +
                      end
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                      # Update mentions for project
         
     | 
| 
      
 24 
     | 
    
         
            +
                      #
         
     | 
| 
      
 25 
     | 
    
         
            +
                      # @param project_id [Integer] Id of project
         
     | 
| 
      
 26 
     | 
    
         
            +
                      # @param opts [Hash] options hash of parameters
         
     | 
| 
      
 27 
     | 
    
         
            +
                      # @option opts [Hash] List The patches to be applied
         
     | 
| 
      
 28 
     | 
    
         
            +
                      # @return [Hashie::Mash] Updated mentions
         
     | 
| 
      
 29 
     | 
    
         
            +
                      def update_data_mentions project_id, opts={}
         
     | 
| 
      
 30 
     | 
    
         
            +
                        patch "projects/#{project_id}/data/mentions", opts
         
     | 
| 
      
 31 
     | 
    
         
            +
                      end
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
                      # Get mentions that fall within the submitted filters with fulltext
         
     | 
| 
      
 34 
     | 
    
         
            +
                      #
         
     | 
| 
      
 35 
     | 
    
         
            +
                      # @param project_id [Integer] Id of project
         
     | 
| 
      
 36 
     | 
    
         
            +
                      # @param opts [Hash] options hash of parameters
         
     | 
| 
      
 37 
     | 
    
         
            +
                      # @option opts [Hash] filter The filters to apply
         
     | 
| 
      
 38 
     | 
    
         
            +
                      # @option opts [Integer] page Page of projects to retrieve
         
     | 
| 
      
 39 
     | 
    
         
            +
                      # @option opts [Integer] pageSize Results per page of results
         
     | 
| 
      
 40 
     | 
    
         
            +
                      # @option opts [String] orderBy Parameter to sort by
         
     | 
| 
      
 41 
     | 
    
         
            +
                      # @option opts [String] orderDirection Direction of sort
         
     | 
| 
      
 42 
     | 
    
         
            +
                      # @option opts [Integer] orderByCategory Category to sort by when orderBy category
         
     | 
| 
      
 43 
     | 
    
         
            +
                      # @return [Hashie::Mash] All Mentions
         
     | 
| 
      
 44 
     | 
    
         
            +
                      def data_mentions_fulltext project_id, opts={}
         
     | 
| 
      
 45 
     | 
    
         
            +
                        get "projects/#{project_id}/data/mentions/fulltext", opts
         
     | 
| 
      
 46 
     | 
    
         
            +
                      end
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
                      # Get mentions that fall within the submitted filters with fulltext
         
     | 
| 
      
 49 
     | 
    
         
            +
                      #
         
     | 
| 
      
 50 
     | 
    
         
            +
                      # @param project_id [Integer] Id of project
         
     | 
| 
      
 51 
     | 
    
         
            +
                      # @param opts [Hash] options hash of parameters
         
     | 
| 
      
 52 
     | 
    
         
            +
                      # @option opts [Hash] filter The filters to apply
         
     | 
| 
      
 53 
     | 
    
         
            +
                      # @option opts [Integer] page Page of projects to retrieve
         
     | 
| 
      
 54 
     | 
    
         
            +
                      # @option opts [Integer] pageSize Results per page of results
         
     | 
| 
      
 55 
     | 
    
         
            +
                      # @option opts [String] orderBy Parameter to sort by
         
     | 
| 
      
 56 
     | 
    
         
            +
                      # @option opts [String] orderDirection Direction of sort
         
     | 
| 
      
 57 
     | 
    
         
            +
                      # @option opts [Integer] orderByCategory Category to sort by when orderBy category
         
     | 
| 
      
 58 
     | 
    
         
            +
                      # @return [Hashie::Mash] All Mentions
         
     | 
| 
      
 59 
     | 
    
         
            +
                      def data_mentions_tweets project_id, opts={}
         
     | 
| 
      
 60 
     | 
    
         
            +
                        get "projects/#{project_id}/data/mentions/tweets", opts
         
     | 
| 
      
 61 
     | 
    
         
            +
                      end
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
                    end
         
     | 
| 
      
 64 
     | 
    
         
            +
                  end
         
     | 
| 
      
 65 
     | 
    
         
            +
                end
         
     | 
| 
      
 66 
     | 
    
         
            +
              end
         
     | 
| 
      
 67 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,23 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module BWAPI
         
     | 
| 
      
 2 
     | 
    
         
            +
              class Client
         
     | 
| 
      
 3 
     | 
    
         
            +
                module Projects
         
     | 
| 
      
 4 
     | 
    
         
            +
                  module Data
         
     | 
| 
      
 5 
     | 
    
         
            +
                    # Volume module for projects/data/volume endpoints
         
     | 
| 
      
 6 
     | 
    
         
            +
                    module Volume
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                      # Get all chart data for date ranges broken down by days
         
     | 
| 
      
 9 
     | 
    
         
            +
                      #
         
     | 
| 
      
 10 
     | 
    
         
            +
                      # @param project_id [Integer] Id of project
         
     | 
| 
      
 11 
     | 
    
         
            +
                      # @param opts [Hash] options hash of parameters
         
     | 
| 
      
 12 
     | 
    
         
            +
                      # @option opts [Hash] filter The filters to apply
         
     | 
| 
      
 13 
     | 
    
         
            +
                      # @option opts [Array] dateRanges Date range ids
         
     | 
| 
      
 14 
     | 
    
         
            +
                      # @return [Hashie::Mash] All Chart data mentions
         
     | 
| 
      
 15 
     | 
    
         
            +
                      def data_date_ranges_days project_id, opts={}
         
     | 
| 
      
 16 
     | 
    
         
            +
                        get "projects/#{project_id}/data/volume/dataRanges/days", opts
         
     | 
| 
      
 17 
     | 
    
         
            +
                      end
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                    end
         
     | 
| 
      
 20 
     | 
    
         
            +
                  end
         
     | 
| 
      
 21 
     | 
    
         
            +
                end
         
     | 
| 
      
 22 
     | 
    
         
            +
              end
         
     | 
| 
      
 23 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/bwapi/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: bwapi
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 4.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 4.0.3.pre.158
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Jonathan Chrisp
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2014-01- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-01-29 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rspec
         
     | 
| 
         @@ -144,6 +144,8 @@ files: 
     | 
|
| 
       144 
144 
     | 
    
         
             
            - lib/bwapi/client/projects.rb
         
     | 
| 
       145 
145 
     | 
    
         
             
            - lib/bwapi/client/projects/categories.rb
         
     | 
| 
       146 
146 
     | 
    
         
             
            - lib/bwapi/client/projects/data.rb
         
     | 
| 
      
 147 
     | 
    
         
            +
            - lib/bwapi/client/projects/data/mentions.rb
         
     | 
| 
      
 148 
     | 
    
         
            +
            - lib/bwapi/client/projects/data/volume.rb
         
     | 
| 
       147 
149 
     | 
    
         
             
            - lib/bwapi/client/projects/data_download.rb
         
     | 
| 
       148 
150 
     | 
    
         
             
            - lib/bwapi/client/projects/facebook_queries.rb
         
     | 
| 
       149 
151 
     | 
    
         
             
            - lib/bwapi/client/projects/queries.rb
         
     | 
| 
         @@ -187,14 +189,14 @@ require_paths: 
     | 
|
| 
       187 
189 
     | 
    
         
             
            - lib
         
     | 
| 
       188 
190 
     | 
    
         
             
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
       189 
191 
     | 
    
         
             
              requirements:
         
     | 
| 
       190 
     | 
    
         
            -
              - - '>='
         
     | 
| 
      
 192 
     | 
    
         
            +
              - - ! '>='
         
     | 
| 
       191 
193 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       192 
194 
     | 
    
         
             
                  version: 1.9.2
         
     | 
| 
       193 
195 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       194 
196 
     | 
    
         
             
              requirements:
         
     | 
| 
       195 
     | 
    
         
            -
              - - ' 
     | 
| 
      
 197 
     | 
    
         
            +
              - - ! '>'
         
     | 
| 
       196 
198 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       197 
     | 
    
         
            -
                  version:  
     | 
| 
      
 199 
     | 
    
         
            +
                  version: 1.3.1
         
     | 
| 
       198 
200 
     | 
    
         
             
            requirements: []
         
     | 
| 
       199 
201 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       200 
202 
     | 
    
         
             
            rubygems_version: 2.2.1
         
     | 
| 
         @@ -207,4 +209,3 @@ test_files: 
     | 
|
| 
       207 
209 
     | 
    
         
             
            - spec/bwapi_spec.rb
         
     | 
| 
       208 
210 
     | 
    
         
             
            - spec/fixtures/.netrc
         
     | 
| 
       209 
211 
     | 
    
         
             
            - spec/helper.rb
         
     | 
| 
       210 
     | 
    
         
            -
            has_rdoc: 
         
     |