bwapi 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bwapi.rb +1 -0
  3. data/lib/bwapi/authentication.rb +1 -0
  4. data/lib/bwapi/client.rb +1 -0
  5. data/lib/bwapi/client/admin.rb +1 -0
  6. data/lib/bwapi/client/admin/become.rb +1 -0
  7. data/lib/bwapi/client/admin/search.rb +1 -0
  8. data/lib/bwapi/client/admin/sub_clients.rb +1 -0
  9. data/lib/bwapi/client/admin/users.rb +1 -0
  10. data/lib/bwapi/client/admin/users/sharing.rb +1 -0
  11. data/lib/bwapi/client/brandwatch.rb +1 -0
  12. data/lib/bwapi/client/brandwatch/become.rb +1 -0
  13. data/lib/bwapi/client/brandwatch/client_modules.rb +1 -0
  14. data/lib/bwapi/client/client.rb +1 -0
  15. data/lib/bwapi/client/error_codes.rb +1 -0
  16. data/lib/bwapi/client/filters.rb +1 -0
  17. data/lib/bwapi/client/logout.rb +1 -0
  18. data/lib/bwapi/client/me.rb +1 -0
  19. data/lib/bwapi/client/oauth.rb +1 -0
  20. data/lib/bwapi/client/ping.rb +1 -0
  21. data/lib/bwapi/client/projects.rb +1 -0
  22. data/lib/bwapi/client/projects/categories.rb +1 -0
  23. data/lib/bwapi/client/projects/data.rb +1 -0
  24. data/lib/bwapi/client/projects/data_download.rb +1 -0
  25. data/lib/bwapi/client/projects/facebook_queries.rb +1 -0
  26. data/lib/bwapi/client/projects/queries.rb +1 -0
  27. data/lib/bwapi/client/projects/queries/backfill.rb +1 -0
  28. data/lib/bwapi/client/projects/queries/date_range.rb +1 -0
  29. data/lib/bwapi/client/projects/queries/mentions.rb +1 -0
  30. data/lib/bwapi/client/projects/query_groups.rb +1 -0
  31. data/lib/bwapi/client/projects/sharing.rb +1 -0
  32. data/lib/bwapi/client/projects/signals.rb +1 -0
  33. data/lib/bwapi/client/projects/summary.rb +1 -0
  34. data/lib/bwapi/client/projects/tags.rb +1 -0
  35. data/lib/bwapi/client/projects/users.rb +1 -0
  36. data/lib/bwapi/client/projects/workflow.rb +1 -0
  37. data/lib/bwapi/client/query_validation.rb +1 -0
  38. data/lib/bwapi/client/sso.rb +1 -0
  39. data/lib/bwapi/client/test_search.rb +1 -0
  40. data/lib/bwapi/client/user.rb +1 -0
  41. data/lib/bwapi/client/user/notifications.rb +1 -0
  42. data/lib/bwapi/configuration.rb +1 -0
  43. data/lib/bwapi/connection.rb +1 -0
  44. data/lib/bwapi/request.rb +1 -0
  45. data/lib/bwapi/version.rb +1 -1
  46. data/lib/faraday/response/brandwatch_error.rb +1 -0
  47. data/lib/faraday/utils/utils.rb +1 -0
  48. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c2e256ae41a00031f7d4c5f62d2cab076b34e80
4
- data.tar.gz: d07297df0f274cbe15e42f07492382a3d5b691e7
3
+ metadata.gz: 7fa06ec6c4a51b3a27fc6c941da930d0f6e588ce
4
+ data.tar.gz: 198a523090d3905ca38d43c845d8154b7b435798
5
5
  SHA512:
6
- metadata.gz: 7e6ed60c84b9354250f1e9dead2923020f7b64690d1eada936b9d7acfd590dd006d9e51ad6158abc8f9eee3d9311c3b9b39d3d5c9892b9c676a55ad3b54a8930
7
- data.tar.gz: 752d23785c294481eae8e43eeab66ad6089f74dd7bfbca75a6b97ab858c7128237ea0e9c056f1a58c17ef9015601ab979fd4f090c84bb6fe7bf0d6523ce9f1e2
6
+ metadata.gz: 1c28d816552ab150ef07421c3fe9aaf53e39a538a998d62525692cfa6149ae37a809287a843ef8890cb8df7b6d226c9486160613826b09b372cb4608b04ca6d2
7
+ data.tar.gz: 587f2f686f7de3f7abd79de7ce8d6ea6af6318ab81616a33679f61d7e0d1e9517ce69b34162c5d9e4d148d54f29c7d2a8a164715af43d0ff91c2153ccbe5ded7
@@ -3,6 +3,7 @@ require 'bwapi/configuration'
3
3
  require 'bwapi/error'
4
4
  require 'bwapi/client'
5
5
 
6
+ # BWAPI namespace module
6
7
  module BWAPI
7
8
  extend Configuration
8
9
  class << self
@@ -1,6 +1,7 @@
1
1
  require 'colored'
2
2
 
3
3
  module BWAPI
4
+ # Authentication module helper methods
4
5
  module Authentication
5
6
 
6
7
  # Check if user is authenicated
@@ -18,6 +18,7 @@ require 'bwapi/client/test_search'
18
18
  require 'bwapi/client/user'
19
19
 
20
20
  module BWAPI
21
+ # Client class to create BWAPI instances
21
22
  class Client
22
23
 
23
24
  attr_accessor *Configuration::OPTION_KEYS
@@ -5,6 +5,7 @@ require 'bwapi/client/admin/users'
5
5
 
6
6
  module BWAPI
7
7
  class Client
8
+ # Admin module for admin endpoints
8
9
  module Admin
9
10
 
10
11
  # Get the active queries irrespective of project
@@ -2,6 +2,7 @@ module BWAPI
2
2
  class Client
3
3
  module Admin
4
4
  module Clients
5
+ # Become module for admin/become endpoint
5
6
  module Become
6
7
 
7
8
  # Become user
@@ -2,6 +2,7 @@ module BWAPI
2
2
  class Client
3
3
  module Admin
4
4
  module Clients
5
+ # Search module for admin/search endpoints
5
6
  module Search
6
7
 
7
8
  # Get a list of queries
@@ -2,6 +2,7 @@ module BWAPI
2
2
  class Client
3
3
  module Admin
4
4
  module Clients
5
+ # Subclients module for admin/subclient endpoints
5
6
  module SubClients
6
7
 
7
8
  # Get all sub clients
@@ -4,6 +4,7 @@ module BWAPI
4
4
  class Client
5
5
  module Admin
6
6
  module Clients
7
+ # Users module for admin/users endpoints
7
8
  module Users
8
9
 
9
10
  # Get all users for client
@@ -3,6 +3,7 @@ module BWAPI
3
3
  module Admin
4
4
  module Clients
5
5
  module Users
6
+ # Sharing module for admin/users/sharing endpoints
6
7
  module Sharing
7
8
 
8
9
  # Get a list of project shares for user
@@ -3,6 +3,7 @@ require 'bwapi/client/brandwatch/client_modules'
3
3
 
4
4
  module BWAPI
5
5
  class Client
6
+ # Brandwatch module for brandwatch endpoints
6
7
  module Brandwatch
7
8
 
8
9
  # Create a new data download in project
@@ -1,6 +1,7 @@
1
1
  module BWAPI
2
2
  class Client
3
3
  module Brandwatch
4
+ # Become module for brandwatch/become endpoint
4
5
  module Become
5
6
 
6
7
  # Become user
@@ -1,6 +1,7 @@
1
1
  module BWAPI
2
2
  class Client
3
3
  module Brandwatch
4
+ # ClientModules module for brandwatch/clientModules endpoints
4
5
  module ClientModules
5
6
 
6
7
  # Get a specific clients modules
@@ -1,5 +1,6 @@
1
1
  module BWAPI
2
2
  class Client
3
+ # Client module for client endpoints
3
4
  module Client
4
5
 
5
6
  # Get the current users client
@@ -1,5 +1,6 @@
1
1
  module BWAPI
2
2
  class Client
3
+ # ErrorCodes module for errorCodes endpoint
3
4
  module ErrorCodes
4
5
 
5
6
  # Get the api error codes
@@ -1,5 +1,6 @@
1
1
  module BWAPI
2
2
  class Client
3
+ # Filters module for filters endpoint
3
4
  module Filters
4
5
 
5
6
  # Get the currently supported filters
@@ -1,5 +1,6 @@
1
1
  module BWAPI
2
2
  class Client
3
+ # Logout module for logout endpoint
3
4
  module Logout
4
5
 
5
6
  # Logout user
@@ -1,5 +1,6 @@
1
1
  module BWAPI
2
2
  class Client
3
+ # Me module for me endpoint and helper methods
3
4
  module Me
4
5
 
5
6
  # Get user information
@@ -1,5 +1,6 @@
1
1
  module BWAPI
2
2
  class Client
3
+ # OAuth module for oauth/token endpoint
3
4
  module OAuth
4
5
 
5
6
  # Authenticate a user
@@ -1,5 +1,6 @@
1
1
  module BWAPI
2
2
  class Client
3
+ # Ping module for ping endpoints
3
4
  module Ping
4
5
 
5
6
  # Get ping checking access and available HTTP verbs
@@ -13,6 +13,7 @@ require 'bwapi/client/projects/workflow'
13
13
 
14
14
  module BWAPI
15
15
  class Client
16
+ # Projects module for projects endpoints
16
17
  module Projects
17
18
 
18
19
  # Get all projects
@@ -1,6 +1,7 @@
1
1
  module BWAPI
2
2
  class Client
3
3
  module Projects
4
+ # Categories module for projects/categories endpoints
4
5
  module Categories
5
6
 
6
7
  # Get all categories in project
@@ -1,6 +1,7 @@
1
1
  module BWAPI
2
2
  class Client
3
3
  module Projects
4
+ # Data module for project/data endpoints
4
5
  module Data
5
6
 
6
7
  # Get all chart data for the requested dimensions
@@ -1,6 +1,7 @@
1
1
  module BWAPI
2
2
  class Client
3
3
  module Projects
4
+ # DataDownload module for projects/datadownload endpoints
4
5
  module DataDownload
5
6
 
6
7
  # Get all data downloads in project
@@ -1,6 +1,7 @@
1
1
  module BWAPI
2
2
  class Client
3
3
  module Projects
4
+ # FacebookQueries module for projects/facebookqueries endpoints
4
5
  module FacebookQueries
5
6
 
6
7
  # Get all facebook queries in project
@@ -5,6 +5,7 @@ require 'bwapi/client/projects/queries/mentions'
5
5
  module BWAPI
6
6
  class Client
7
7
  module Projects
8
+ # Queries module for projects/queries endpoints
8
9
  module Queries
9
10
 
10
11
  # Get all queries in project
@@ -2,6 +2,7 @@ module BWAPI
2
2
  class Client
3
3
  module Projects
4
4
  module Queries
5
+ # Backfill module for projects/queries/backfill endpoints
5
6
  module Backfill
6
7
 
7
8
  # Get all backfills for query
@@ -2,6 +2,7 @@ module BWAPI
2
2
  class Client
3
3
  module Projects
4
4
  module Queries
5
+ # DateRange module for projects/queries/dateRange endpoints
5
6
  module DateRange
6
7
 
7
8
  # Get all date ranges for query
@@ -2,6 +2,7 @@ module BWAPI
2
2
  class Client
3
3
  module Projects
4
4
  module Queries
5
+ # Mentions module for projects/queries/mentions endpoints
5
6
  module Mentions
6
7
 
7
8
  # Get the full text of query mention
@@ -1,6 +1,7 @@
1
1
  module BWAPI
2
2
  class Client
3
3
  module Projects
4
+ # QueryGroups module for projects/queryGroups endpoints
4
5
  module QueryGroups
5
6
 
6
7
  # Get all query groups in project
@@ -1,6 +1,7 @@
1
1
  module BWAPI
2
2
  class Client
3
3
  module Projects
4
+ # Sharing module for projects/sharing endpoints
4
5
  module Sharing
5
6
 
6
7
  # Default shares of a project
@@ -1,6 +1,7 @@
1
1
  module BWAPI
2
2
  class Client
3
3
  module Projects
4
+ # Signals module for projects/signals endpoints
4
5
  module Signals
5
6
 
6
7
  # Get all signals belonging to user in project
@@ -1,6 +1,7 @@
1
1
  module BWAPI
2
2
  class Client
3
3
  module Projects
4
+ # Summary module for projects/summary endpoints
4
5
  module Summary
5
6
 
6
7
  # Summary of projects
@@ -1,6 +1,7 @@
1
1
  module BWAPI
2
2
  class Client
3
3
  module Projects
4
+ # Tags module for projects/tags endpoints
4
5
  module Tags
5
6
 
6
7
  # Get all tags in project
@@ -1,6 +1,7 @@
1
1
  module BWAPI
2
2
  class Client
3
3
  module Projects
4
+ # Users module for projects/users endpoint
4
5
  module Users
5
6
 
6
7
  # Get all users shared with project
@@ -1,6 +1,7 @@
1
1
  module BWAPI
2
2
  class Client
3
3
  module Projects
4
+ # Workflow module for projects/workflow endpoint
4
5
  module Workflow
5
6
 
6
7
  # Get all workflow categories for project
@@ -1,5 +1,6 @@
1
1
  module BWAPI
2
2
  class Client
3
+ # QueryValidation module for queryValidation endpoints
3
4
  module QueryValidation
4
5
 
5
6
  # Check to see if a query string is valid
@@ -1,5 +1,6 @@
1
1
  module BWAPI
2
2
  class Client
3
+ # SSO module for sso endpoint
3
4
  module SSO
4
5
 
5
6
  # Authorize another user for access
@@ -1,5 +1,6 @@
1
1
  module BWAPI
2
2
  class Client
3
+ # TestSearch module for testSearch endpoint
3
4
  module TestSearch
4
5
 
5
6
  # TODO: Uncomment once the endpoint has been fixed
@@ -2,6 +2,7 @@ require 'bwapi/client/user/notifications'
2
2
 
3
3
  module BWAPI
4
4
  class Client
5
+ # User module for user endpoints and helper methods
5
6
  module User
6
7
 
7
8
  # Get the current user
@@ -1,6 +1,7 @@
1
1
  module BWAPI
2
2
  class Client
3
3
  module User
4
+ # Notifications module for projects/notifications endpoints
4
5
  module Notifications
5
6
 
6
7
  # Get the current user notifications
@@ -1,6 +1,7 @@
1
1
  require 'faraday'
2
2
 
3
3
  module BWAPI
4
+ # Configuration module to set default and custom client credentials
4
5
  module Configuration
5
6
 
6
7
  OPTION_KEYS = [
@@ -3,6 +3,7 @@ require 'faraday/response/brandwatch_error'
3
3
  require 'faraday/utils/utils'
4
4
 
5
5
  module BWAPI
6
+ # Connection module to handle requests
6
7
  module Connection
7
8
  private
8
9
 
@@ -1,6 +1,7 @@
1
1
  require 'multi_json'
2
2
 
3
3
  module BWAPI
4
+ # Request module to handle all requests to API
4
5
  module Request
5
6
 
6
7
  # Perform a get request
@@ -1,3 +1,3 @@
1
1
  module BWAPI
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
@@ -2,6 +2,7 @@ require 'faraday'
2
2
  require 'multi_json'
3
3
 
4
4
  module Faraday
5
+ # Response::BrandwatchError class to raise custom faraday middleware errors
5
6
  class Response::BrandwatchError < Response::Middleware
6
7
  ERROR_MAP = {
7
8
  400 => BWAPI::BadRequest,
@@ -3,6 +3,7 @@ require 'faraday'
3
3
  # TODO: Remove this patch once latest faraday rc has been released
4
4
  # https://github.com/lostisland/faraday/issues/182#issuecomment-19518167
5
5
  module Faraday
6
+ # Overriding Faraday::Utils module build_nested_query method
6
7
  module Utils
7
8
  def build_nested_query(value, prefix = nil)
8
9
  case value
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bwapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Chrisp