bwapi 10.0.0.pre.549 → 10.0.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.
Files changed (67) hide show
  1. checksums.yaml +5 -13
  2. data/.editorconfig +1 -1
  3. data/.gitignore +1 -1
  4. data/lib/bwapi/client.rb +3 -26
  5. data/lib/bwapi/client/admin.rb +0 -2
  6. data/lib/bwapi/client/brandwatch.rb +0 -6
  7. data/lib/bwapi/client/brandwatch/become.rb +2 -0
  8. data/lib/bwapi/client/brandwatch/clients.rb +8 -2
  9. data/lib/bwapi/client/brandwatch/clients/users.rb +2 -0
  10. data/lib/bwapi/client/command_center.rb +0 -12
  11. data/lib/bwapi/client/command_center/displays/scenes.rb +1 -1
  12. data/lib/bwapi/client/command_center/scene_types.rb +3 -3
  13. data/lib/bwapi/client/oauth.rb +1 -2
  14. data/lib/bwapi/client/projects.rb +11 -13
  15. data/lib/bwapi/client/projects/{bulk_actions.rb → bulkactions.rb} +2 -2
  16. data/lib/bwapi/client/projects/{bulk_actions → bulkactions}/author.rb +0 -0
  17. data/lib/bwapi/client/projects/{bulk_actions → bulkactions}/mentions.rb +0 -0
  18. data/lib/bwapi/client/projects/data.rb +0 -20
  19. data/lib/bwapi/client/projects/data/mentions.rb +2 -32
  20. data/lib/bwapi/client/projects/signals/groups.rb +5 -18
  21. data/lib/bwapi/client/user.rb +0 -2
  22. data/lib/bwapi/configuration.rb +2 -3
  23. data/lib/bwapi/default.rb +3 -7
  24. data/lib/bwapi/error.rb +2 -0
  25. data/spec/bwapi/client_spec.rb +167 -29
  26. metadata +30 -72
  27. data/lib/bwapi/client/admin/demographics.rb +0 -17
  28. data/lib/bwapi/client/aggregates.rb +0 -13
  29. data/lib/bwapi/client/author.rb +0 -56
  30. data/lib/bwapi/client/brandwatch/clients/command_center.rb +0 -20
  31. data/lib/bwapi/client/brandwatch/clients/command_center/limits.rb +0 -33
  32. data/lib/bwapi/client/brandwatch/clients/command_center/scene_types.rb +0 -26
  33. data/lib/bwapi/client/brandwatch/clients/command_center/themes.rb +0 -26
  34. data/lib/bwapi/client/brandwatch/clients/command_center/users.rb +0 -30
  35. data/lib/bwapi/client/brandwatch/clients/command_center/users/access.rb +0 -28
  36. data/lib/bwapi/client/brandwatch/command_center.rb +0 -14
  37. data/lib/bwapi/client/brandwatch/command_center/scene_types.rb +0 -31
  38. data/lib/bwapi/client/brandwatch/command_center/themes.rb +0 -17
  39. data/lib/bwapi/client/brandwatch/log_level.rb +0 -17
  40. data/lib/bwapi/client/brandwatch/price_structures.rb +0 -45
  41. data/lib/bwapi/client/brandwatch/usage_report.rb +0 -19
  42. data/lib/bwapi/client/command_center/category_colours.rb +0 -15
  43. data/lib/bwapi/client/command_center/colour_palette.rb +0 -22
  44. data/lib/bwapi/client/command_center/display_access.rb +0 -12
  45. data/lib/bwapi/client/command_center/display_access/users.rb +0 -14
  46. data/lib/bwapi/client/command_center/display_access/users/access.rb +0 -21
  47. data/lib/bwapi/client/command_center/projects.rb +0 -16
  48. data/lib/bwapi/client/command_center/projects/category_colours.rb +0 -45
  49. data/lib/bwapi/client/command_center/projects/data.rb +0 -21
  50. data/lib/bwapi/client/command_center/projects/tag_colours.rb +0 -45
  51. data/lib/bwapi/client/command_center/query_colours.rb +0 -36
  52. data/lib/bwapi/client/command_center/tag_colours.rb +0 -15
  53. data/lib/bwapi/client/dimensions.rb +0 -13
  54. data/lib/bwapi/client/projects/data/audience.rb +0 -21
  55. data/lib/bwapi/client/projects/data/audience_activity.rb +0 -21
  56. data/lib/bwapi/client/projects/data/channel_metrics.rb +0 -21
  57. data/lib/bwapi/client/projects/data/emoticons.rb +0 -23
  58. data/lib/bwapi/client/projects/data/hashtags.rb +0 -23
  59. data/lib/bwapi/client/projects/data/headlines.rb +0 -20
  60. data/lib/bwapi/client/projects/data/impressions.rb +0 -21
  61. data/lib/bwapi/client/projects/data/mentioned_authors.rb +0 -23
  62. data/lib/bwapi/client/projects/data/owner_activity.rb +0 -21
  63. data/lib/bwapi/client/projects/data/urls.rb +0 -23
  64. data/lib/bwapi/client/projects/query/mentionfind.rb +0 -21
  65. data/lib/bwapi/client/user/instagram_credentials.rb +0 -32
  66. data/spec/bwapi/configuration_spec.rb +0 -499
  67. data/spec/bwapi/default_spec.rb +0 -242
@@ -1,17 +0,0 @@
1
- module BWAPI
2
- class Client
3
- module Admin
4
- # Demographics module for admin/demographics endpoints
5
- module Demographics
6
- # Get the classification of an author by author description
7
- #
8
- # @param opts [Hash] options hash of parameters
9
- # @option opts [String] description of the author
10
- # @return [Hash] Classification of an author
11
- def classify_author(opts = {})
12
- get 'admin/demographics/classify', opts
13
- end
14
- end
15
- end
16
- end
17
- end
@@ -1,13 +0,0 @@
1
- module BWAPI
2
- class Client
3
- # Aggregates module for aggregates endpoints
4
- module Aggregates
5
- # Get the list of current aggregate dimensions
6
- #
7
- # @return [Array] All aggregates
8
- def aggregates
9
- get 'aggregates'
10
- end
11
- end
12
- end
13
- end
@@ -1,56 +0,0 @@
1
- module BWAPI
2
- class Client
3
- # Author module for author endpoints
4
- module Author
5
- # Gets all author professions
6
- #
7
- # @param opts [Hash] options hash of parameters
8
- # @option opts [Integer] page Page of results to retrieve
9
- # @option opts [Integer] pageSize Results per page of results
10
- # @return [Hash] All author professions
11
- def author_professions(opts = {})
12
- get 'authors/professions', opts
13
- end
14
-
15
- # Gets all author interests
16
- #
17
- # @param opts [Hash] options hash of parameters
18
- # @option opts [Integer] page Page of results to retrieve
19
- # @option opts [Integer] pageSize Results per page of results
20
- # @return [Hash] All author interests
21
- def author_interests(opts = {})
22
- get 'authors/interests', opts
23
- end
24
-
25
- # Get an Author with its associated accounts using an account name/domain tuple
26
- #
27
- # @param name [String] Account username
28
- # @param opts [Hash] options hash of parameters
29
- # @option opts [String] domain Account domain
30
- # @return [Hash] Author
31
- def get_author(name, opts = {})
32
- get "authors/#{name}", opts
33
- end
34
-
35
- # Update an Author using an account name/domain tuple
36
- #
37
- # @param name [String] Account username
38
- # @param opts [Hash] options hash of parameters
39
- # @option opts [String] accountType Account type of Author Patch
40
- # @option opts [Array] addInterests Interests to add of Author Patch
41
- # @option opts [Array] addProfessions Professions to add of Author Patch
42
- # @option opts [String] domain Domain of Author Patch
43
- # @option opts [String] gender Gender of Author Patch
44
- # @option opts [Integer] projectId Project ID of Author Patch
45
- # @option opts [Integer] queryId Query ID of Author Patch
46
- # @option opts [Array] removeInterests Interests to remove of Author Patch
47
- # @option opts [Array] removeProfessions Professions to remove of Author Patch
48
- # @option opts [Integer] resourceId Resource ID of Author Patch
49
- # @option opts [String] username Username of Author to be patched
50
- # @return [Hash] Updated author
51
- def update_author(name, opts = {})
52
- patch "authors/#{name}", opts
53
- end
54
- end
55
- end
56
- end
@@ -1,20 +0,0 @@
1
- require 'bwapi/client/brandwatch/clients/command_center/limits'
2
- require 'bwapi/client/brandwatch/clients/command_center/scene_types'
3
- require 'bwapi/client/brandwatch/clients/command_center/themes'
4
- require 'bwapi/client/brandwatch/clients/command_center/users'
5
-
6
- module BWAPI
7
- class Client
8
- module Brandwatch
9
- module Clients
10
- # CommandCenter module for brandwatch/client/{client_id}/commandcenter endpoints
11
- module CommandCenter
12
- include BWAPI::Client::Brandwatch::Clients::CommandCenter::Limits
13
- include BWAPI::Client::Brandwatch::Clients::CommandCenter::SceneTypes
14
- include BWAPI::Client::Brandwatch::Clients::CommandCenter::Themes
15
- include BWAPI::Client::Brandwatch::Clients::CommandCenter::Users
16
- end
17
- end
18
- end
19
- end
20
- end
@@ -1,33 +0,0 @@
1
- module BWAPI
2
- class Client
3
- module Brandwatch
4
- module Clients
5
- module CommandCenter
6
- # Limits module for brandwatch/client/{client_id}/commandcenter/limits endpoints
7
- module Limits
8
- # Fetch configured limits for a Vizia client
9
- #
10
- # TODO: Add parameters documentation
11
- def brandwatch_vizia_limits(client_id)
12
- get "/brandwatch/clients/#{client_id}/commandcenter/limits"
13
- end
14
-
15
- # Create limits for a Vizia client
16
- #
17
- # TODO: Add parameters documentation
18
- def brandwatch_create_vizia_limits(client_id, opts = {})
19
- post "/brandwatch/clients/#{client_id}/commandcenter/limits", opts
20
- end
21
-
22
- # Update limits for a Vizia client
23
- #
24
- # TODO: Add parameters documentation
25
- def brandwatch_update_vizia_limits(client_id, opts = {})
26
- put "/brandwatch/clients/#{client_id}/commandcenter/limits", opts
27
- end
28
- end
29
- end
30
- end
31
- end
32
- end
33
- end
@@ -1,26 +0,0 @@
1
- module BWAPI
2
- class Client
3
- module Brandwatch
4
- module Clients
5
- module CommandCenter
6
- # SceneTypes module for brandwatch/client/{client_id}/commandcenter/scenetypes endpoints
7
- module SceneTypes
8
- # Fetch all scene types enabled for given client
9
- #
10
- # TODO: Add parameters documentation
11
- def brandwatch_scene_types(client_id)
12
- get "/brandwatch/clients/#{client_id}/commandcenter/scenetypes"
13
- end
14
-
15
- # Alter Vizia scene types enabled for client
16
- #
17
- # TODO: Add parameters documentation
18
- def brandwatch_update_scene_type(client_id, opts = {})
19
- put "/brandwatch/clients/#{client_id}/commandcenter/scenetypes", opts
20
- end
21
- end
22
- end
23
- end
24
- end
25
- end
26
- end
@@ -1,26 +0,0 @@
1
- module BWAPI
2
- class Client
3
- module Brandwatch
4
- module Clients
5
- module CommandCenter
6
- # Themes module for brandwatch/client/{client_id}/commandcenter/themes endpoints
7
- module Themes
8
- # Get Vizia themes enabled for client
9
- #
10
- # TODO: Add parameters documentation
11
- def brandwatch_themes(client_id)
12
- get "brandwatch/client/#{client_id}/commandcenter/themes"
13
- end
14
-
15
- # Alter Vizia themes enabled for client
16
- #
17
- # TODO: Add parameters documentation
18
- def brandwatch_update_themes(client_id, opts = {})
19
- get "brandwatch/client/#{client_id}/commandcenter/themes", opts
20
- end
21
- end
22
- end
23
- end
24
- end
25
- end
26
- end
@@ -1,30 +0,0 @@
1
- require 'bwapi/client/brandwatch/clients/command_center/users/access'
2
-
3
- module BWAPI
4
- class Client
5
- module Brandwatch
6
- module Clients
7
- module CommandCenter
8
- # Users module for brandwatch/client/{client_id}/commandcenter/users endpoints
9
- module Users
10
- # Fetch Vizia access levels for all users in client
11
- #
12
- # TODO: Add parameters documentation
13
- def brandwatch_users_access_levels(client_id)
14
- get "brandwatch/client/#{client_id}/commandcenter/users"
15
- end
16
-
17
- # Fetch a single user's Vizia access level
18
- #
19
- # TODO: Add parameters documentation
20
- def brandwatch_user_access_level(client_id, user_id)
21
- get "brandwatch/client/#{client_id}/commandcenter/users/#{user_id}"
22
- end
23
-
24
- include BWAPI::Client::Brandwatch::Clients::CommandCenter::Users::Access
25
- end
26
- end
27
- end
28
- end
29
- end
30
- end
@@ -1,28 +0,0 @@
1
- module BWAPI
2
- class Client
3
- module Brandwatch
4
- module Clients
5
- module CommandCenter
6
- module Users
7
- # Access module for brandwatch/client/{client_id}/commandcenter/users/{user_id}/access endpoints
8
- module Access
9
- # Update a user's Vizia access level
10
- #
11
- # TODO: Add parameters documentation
12
- def brandwatch_update_user_access_level(client_id, user_id, access_level)
13
- put "brandwatch/client/#{client_id}/commandcenter/users/#{user_id}/access/#{access_level}"
14
- end
15
-
16
- # Revoke a user's Vizia access
17
- #
18
- # TODO: Add parameters documentation
19
- def brandwatch_delete_user_access_level(client_id, user_id, access_level)
20
- delete "brandwatch/client/#{client_id}/commandcenter/users/#{user_id}/access/#{access_level}"
21
- end
22
- end
23
- end
24
- end
25
- end
26
- end
27
- end
28
- end
@@ -1,14 +0,0 @@
1
- require 'bwapi/client/brandwatch/command_center/scene_types'
2
- require 'bwapi/client/brandwatch/command_center/themes'
3
-
4
- module BWAPI
5
- class Client
6
- module Brandwatch
7
- # CommandCenter module for brandwatch/commandcenter endpoints
8
- module CommandCenter
9
- include BWAPI::Client::Brandwatch::CommandCenter::SceneTypes
10
- include BWAPI::Client::Brandwatch::CommandCenter::Themes
11
- end
12
- end
13
- end
14
- end
@@ -1,31 +0,0 @@
1
- module BWAPI
2
- class Client
3
- module Brandwatch
4
- module CommandCenter
5
- # SceneTypes module for brandwatch/commandcenter/scenetypes endpoints
6
- module SceneTypes
7
- # Fetch all supported parent scene types
8
- #
9
- # TODO: Add parameters documentation
10
- def brandwatch_all_scene_types
11
- get 'brandwatch/commandcenter/scenetypes'
12
- end
13
-
14
- # Fetch a scene type
15
- #
16
- # TODO: Add parameters documentation
17
- def brandwatch_scene_type(scene_type_id)
18
- get "brandwatch/commandcenter/scenetypes/#{scene_type_id}"
19
- end
20
-
21
- # Fetch all sub scene types for a scene type
22
- #
23
- # TODO: Add parameters documentation
24
- def brandwatch_scene_type_with_sub_scenes(scene_type_id)
25
- get "brandwatch/commandcenter/scenetypes/#{scene_type_id}/subscenes"
26
- end
27
- end
28
- end
29
- end
30
- end
31
- end
@@ -1,17 +0,0 @@
1
- module BWAPI
2
- class Client
3
- module Brandwatch
4
- module CommandCenter
5
- # Themes module for brandwatch/commandcenter/themes endpoints
6
- module Themes
7
- # Get supported Vizia themes
8
- #
9
- # @return [Hash] All themes
10
- def brandwatch_all_themes
11
- get 'brandwatch/commandcenter/themes'
12
- end
13
- end
14
- end
15
- end
16
- end
17
- end
@@ -1,17 +0,0 @@
1
- module BWAPI
2
- class Client
3
- module Brandwatch
4
- # Loglevel module for brandwatch/log-level endpoint
5
- module LogLevel
6
- # Change the API LogLevel
7
- #
8
- # @param opts [Hash] options hash of parameters
9
- # @option opts [String] logLevel for API2
10
- # @return [Array] Returns the updated log level
11
- def brandwatch_log_level(opts = {})
12
- post 'brandwatch/log-level', opts
13
- end
14
- end
15
- end
16
- end
17
- end
@@ -1,45 +0,0 @@
1
- module BWAPI
2
- class Client
3
- module Brandwatch
4
- # PriceStructures module for brandwatch/pricestructures endpoint
5
- module PriceStructures
6
- # Show available price structures
7
- #
8
- # @return [Array] List of all price structures
9
- def get_price_structures
10
- get 'brandwatch/pricestructures'
11
- end
12
-
13
- # Create a new price structure
14
- #
15
- # @param opts [Hash] options Hash of parameters
16
- # @option opts [Integer] autoDeleteDays Auto delete days of the price structure
17
- # @option opts [Boolean] autoUpgrade If the price structure can be auto upgraded
18
- # @option opts [Integer] availableBackfillMonths Available backfill months of the price structure
19
- # @option opts [Integer] backfillMentionLimit Backfill mention limit of the price structure
20
- # @option opts [String] backfillMentionLimitPeriod Backfill mention limit period of the price structure
21
- # @option opts [String] currencyCode Currency code of the price structure
22
- # @option opts [String] description Description of the price structure
23
- # @option opts [Boolean] forWebSignUp If the price structure is for web sign up
24
- # @option opts [Integer] id Id of the price structure
25
- # @option opts [String] mentionLimitPeriod Mention limit period of the price structure
26
- # @option opts [String] name Name of the price structure
27
- # @option opts [String] notes Notes for the price structure
28
- # @option opts [Array] priceStructureLines Price structure lines belonging to the price structure
29
- # @option opts [Boolean] resellerAllowed If the price structure is reseller allowed
30
- # @return [Hash] Newly created price structure
31
- def create_price_structure(opts)
32
- post 'brandwatch/pricestructures', opts
33
- end
34
-
35
- # Delete a price structure
36
- #
37
- # @param price_structure_id [Integer] Id of the price structure
38
- # @return [Hash] Deleted price structure
39
- def delete_price_structure(price_structure_id)
40
- delete "brandwatch/pricestructures/#{price_structure_id}"
41
- end
42
- end
43
- end
44
- end
45
- end
@@ -1,19 +0,0 @@
1
- module BWAPI
2
- class Client
3
- module Brandwatch
4
- # usageReport module for brandwatch/usageReport endpoint
5
- module UsageReport
6
- # Get the Clients Mention Usage report
7
- #
8
- # @param clientId [Integer] Id of client
9
- # @param startDate [DateTime] Report startDate
10
- # @param endDate [DateTime] Report endDate
11
- # @param opts [Hash] options hash of parameters
12
- # @return [Hash] Returns usage report for active client
13
- def brandwatch_usage_report(clientId, startDate, endDate, opts = {})
14
- get "brandwatch/usageReport/client/#{clientId}/start/#{startDate}/end/#{endDate}", opts
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,15 +0,0 @@
1
- module BWAPI
2
- class Client
3
- module CommandCenter
4
- # CategoryColours module for commandcenter/categoryColours endpoints
5
- module CategoryColours
6
- # Get colours defined for categories in current client
7
- #
8
- # TODO: Add parameters documentation
9
- def all_category_colours
10
- get 'commandcenter/categoryColours'
11
- end
12
- end
13
- end
14
- end
15
- end
@@ -1,22 +0,0 @@
1
- module BWAPI
2
- class Client
3
- module CommandCenter
4
- # ColourPalette module for commandcenter/colourPalette endpoints
5
- module ColourPalette
6
- # Get the colour palette for the current client
7
- #
8
- # TODO: Add parameters documentation
9
- def colour_palette
10
- get '/commandcenter/colourPalette'
11
- end
12
-
13
- # Update the colour palette for the current client
14
- #
15
- # TODO: Add parameters documentation
16
- def update_colour_palette(opts = {})
17
- put '/commandcenter/colourPalette', opts
18
- end
19
- end
20
- end
21
- end
22
- end