bwapi 11.0.1.pre.563 → 11.0.1.pre.568

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +8 -8
  2. data/lib/bwapi/client.rb +2 -0
  3. data/lib/bwapi/client/admin.rb +11 -6
  4. data/lib/bwapi/client/admin/clients.rb +23 -0
  5. data/lib/bwapi/client/admin/reseller.rb +29 -0
  6. data/lib/bwapi/client/brandwatch.rb +23 -0
  7. data/lib/bwapi/client/brandwatch/clients.rb +2 -0
  8. data/lib/bwapi/client/brandwatch/clients/command_center/themes.rb +11 -4
  9. data/lib/bwapi/client/brandwatch/clients/grant_types.rb +38 -0
  10. data/lib/bwapi/client/brandwatch/command_center/themes.rb +43 -1
  11. data/lib/bwapi/client/brandwatch/host_location_overrides.rb +22 -0
  12. data/lib/bwapi/client/brandwatch/price_structures.rb +7 -0
  13. data/lib/bwapi/client/client.rb +18 -0
  14. data/lib/bwapi/client/client/grant_types.rb +15 -0
  15. data/lib/bwapi/client/command_center/displays/messages.rb +3 -3
  16. data/lib/bwapi/client/command_center/users.rb +1 -1
  17. data/lib/bwapi/client/locations.rb +2 -2
  18. data/lib/bwapi/client/projects.rb +16 -0
  19. data/lib/bwapi/client/projects/bulk_actions/mentions.rb +7 -0
  20. data/lib/bwapi/client/projects/data/mentions.rb +7 -0
  21. data/lib/bwapi/client/projects/data/volume.rb +8 -12
  22. data/lib/bwapi/client/projects/data_download.rb +3 -3
  23. data/lib/bwapi/client/projects/ditto_queries.rb +3 -3
  24. data/lib/bwapi/client/projects/facebook_queries.rb +7 -0
  25. data/lib/bwapi/client/projects/preview_search.rb +15 -0
  26. data/lib/bwapi/client/projects/queries/mentions.rb +9 -9
  27. data/lib/bwapi/client/projects/signals.rb +0 -15
  28. data/lib/bwapi/client/projects/twitter_queries.rb +7 -0
  29. data/lib/bwapi/client/public.rb +13 -0
  30. data/lib/bwapi/client/sso.rb +7 -0
  31. data/lib/bwapi/client/user.rb +62 -0
  32. data/lib/bwapi/client/user/facebook.rb +15 -0
  33. data/lib/bwapi/client/user/tokens.rb +22 -0
  34. data/lib/bwapi/client/user/twitter_credentials.rb +29 -0
  35. metadata +12 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Mzc5MWQ2NjUyYTRjOGM3ZDFmNWJkNDcxM2IzYWM2ZDc1NDQ3ZjZiMA==
4
+ OWQxZWFlMzZjOWFkNjUyMWYzZmFkNDc5NDVlN2FhN2E1NzljMWFjMw==
5
5
  data.tar.gz: !binary |-
6
- ZWMzMDExZGU4N2FkMTFkMWU5MzJhMGUyYjEzNDgyNzE4ZjBmMjY0ZQ==
6
+ ZmQ4NjdiMTk4ZmVhYjNjNjhlNjA4NjJlYzIyNjNhOTFmMGI2OWM3ZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDY0YmJlZWYyOGVlNGY0NTI4MTYwNDBmYTc4NjM0ZjU4MDcwZTA5ZjEzZGI1
10
- ODc3MTdmZDgwYzRlOTIzODJiY2E5YTYwM2Q1NTBkMGJjNzY3NzY0OTc2YTZh
11
- MGVhZjFlODBiYjAyNTM4YzQyZjRjNzhkOTRjMDU5NGJkMWJmYTM=
9
+ NTQ3YjA0Y2RkNGQyYWI3YjcxZmZkMGEwMmFiNDBlZjRiNDcwNzViYjA2ZjYx
10
+ MTBjM2RiMGE0OTdjODE4M2RkOWQ0ZjY4NDc4M2Q4MGQyOTZkZTRhZDU1NTIy
11
+ NjQ2NGU2ZGNhOTEzMjAwMGQ4Zjc3OWRiYWFiNjFmYTk2NjM2ZjA=
12
12
  data.tar.gz: !binary |-
13
- OTdmZDRhNDQwNWFjNjQ4NTU0ZTI5NzlkZmM3OTg1ZTY3N2I3ZDFlNjE3YmI4
14
- NGNkMjZmMGEyZjgwMWExN2NkZGQwN2JlYTkyNTMwMWE2NTVhN2RkMTRhMmM4
15
- YTYzODQ2ZmU3NWJhZGY3NmZmNzE3MDdjYzczOGY5MDBjNDhmNzk=
13
+ M2JiNWY2NjRkYzg0NWI1MTA2NzZlZDZmMjBhZGMzN2MwOTdlOTk1ZTRiYTJh
14
+ Y2M5MzgzZDBiMzdiNmRkMjQxMjIzOTE5MGE3MWY4NmU0ZDI4YWRkN2VhNjVj
15
+ MmU1MjExMjlkZWYwNzdiNDFlMWU4NDE3YzU2ZDBjYjRlOTcyYjA=
data/lib/bwapi/client.rb CHANGED
@@ -20,6 +20,7 @@ require 'bwapi/client/metrics'
20
20
  require 'bwapi/client/oauth'
21
21
  require 'bwapi/client/ping'
22
22
  require 'bwapi/client/projects'
23
+ require 'bwapi/client/public'
23
24
  require 'bwapi/client/query_validation'
24
25
  require 'bwapi/client/sso'
25
26
  require 'bwapi/client/test_search'
@@ -51,6 +52,7 @@ module BWAPI
51
52
  include BWAPI::Client::OAuth
52
53
  include BWAPI::Client::Ping
53
54
  include BWAPI::Client::Projects
55
+ include BWAPI::Client::Public
54
56
  include BWAPI::Client::QueryValidation
55
57
  include BWAPI::Client::SSO
56
58
  include BWAPI::Client::TestSearch
@@ -1,9 +1,8 @@
1
1
  require 'bwapi/client/admin/become'
2
+ require 'bwapi/client/admin/clients'
2
3
  require 'bwapi/client/admin/demographics'
4
+ require 'bwapi/client/admin/reseller'
3
5
  require 'bwapi/client/admin/search'
4
- require 'bwapi/client/admin/clients/sub_clients'
5
- require 'bwapi/client/admin/clients/users'
6
- require 'bwapi/client/admin/clients/user_groups'
7
6
 
8
7
  module BWAPI
9
8
  class Client
@@ -27,12 +26,18 @@ module BWAPI
27
26
  get 'admin/sharing-report'
28
27
  end
29
28
 
29
+ # Retrieve a list of pricing options
30
+ #
31
+ # TODO: Add parameters documentation
32
+ def pricing_options
33
+ get 'admin/pricingoptions'
34
+ end
35
+
30
36
  include BWAPI::Client::Admin::Become
37
+ include BWAPI::Client::Admin::Clients
31
38
  include BWAPI::Client::Admin::Demographics
39
+ include BWAPI::Client::Admin::Reseller
32
40
  include BWAPI::Client::Admin::Search
33
- include BWAPI::Client::Admin::Clients::SubClients
34
- include BWAPI::Client::Admin::Clients::Users
35
- include BWAPI::Client::Admin::Clients::UserGroups
36
41
  end
37
42
  end
38
43
  end
@@ -0,0 +1,23 @@
1
+ require 'bwapi/client/admin/clients/sub_clients'
2
+ require 'bwapi/client/admin/clients/users'
3
+ require 'bwapi/client/admin/clients/user_groups'
4
+
5
+ module BWAPI
6
+ class Client
7
+ module Admin
8
+ # Clients module for admin/clients endpoints
9
+ module Clients
10
+ # Retrieve the login count for users for the given client
11
+ #
12
+ # TODO: Add parameters documentation
13
+ def login_report(client_id, opts = {})
14
+ get "admin/clients/#{client_id}/login-report", opts
15
+ end
16
+
17
+ include BWAPI::Client::Admin::Clients::SubClients
18
+ include BWAPI::Client::Admin::Clients::Users
19
+ include BWAPI::Client::Admin::Clients::UserGroups
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,29 @@
1
+ module BWAPI
2
+ class Client
3
+ module Admin
4
+ # Reseller module for admin/reseller endpoints
5
+ module Reseller
6
+ # Requests reseller usage report
7
+ #
8
+ # TODO: Add parameters documentation
9
+ def reseller_mention_usage_report
10
+ get '/admin/reseller/requestMentionUsageReport'
11
+ end
12
+
13
+ # Requests reseller usage summaries
14
+ #
15
+ # TODO: Add parameters documentation
16
+ def reseller_usage_summary
17
+ get '/admin/reseller/usageSummary'
18
+ end
19
+
20
+ # Requests reseller usage summaries for a specific client
21
+ #
22
+ # TODO: Add parameters documentation
23
+ def client_reseller_usage_summary(client_id)
24
+ get "/admin/reseller/usageSummary/#{client_id}"
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -2,6 +2,7 @@ require 'bwapi/client/brandwatch/become'
2
2
  require 'bwapi/client/brandwatch/clients'
3
3
  require 'bwapi/client/brandwatch/command_center'
4
4
  require 'bwapi/client/brandwatch/ditto_brands'
5
+ require 'bwapi/client/brandwatch/host_location_overrides'
5
6
  require 'bwapi/client/brandwatch/log_level'
6
7
  require 'bwapi/client/brandwatch/price_structures'
7
8
  require 'bwapi/client/brandwatch/usage_report'
@@ -29,10 +30,32 @@ module BWAPI
29
30
  post "brandwatch/#{project_id}/datadownload", opts
30
31
  end
31
32
 
33
+ # Alter the logging level override for given access token
34
+ #
35
+ # TODO: Add parameters documentation
36
+ def update_token_log_level(opts = {})
37
+ put '/brandwatch/token-log-level', opts
38
+ end
39
+
40
+ # Get the logging level override for given access token
41
+ #
42
+ # TODO: Add parameters documentation
43
+ def get_token_log_level(access_token)
44
+ get "/brandwatch/token-log-level/#{access_token}"
45
+ end
46
+
47
+ # Remove the logging level override for given access token
48
+ #
49
+ # TODO: Add parameters documentation
50
+ def delete_token_log_level(access_token)
51
+ delete "/brandwatch/token-log-level/#{access_token}"
52
+ end
53
+
32
54
  include BWAPI::Client::Brandwatch::Become
33
55
  include BWAPI::Client::Brandwatch::Clients
34
56
  include BWAPI::Client::Brandwatch::CommandCenter
35
57
  include BWAPI::Client::Brandwatch::DittoBrands
58
+ include BWAPI::Client::Brandwatch::HostLocationOverrides
36
59
  include BWAPI::Client::Brandwatch::LogLevel
37
60
  include BWAPI::Client::Brandwatch::PriceStructures
38
61
  include BWAPI::Client::Brandwatch::UsageReport
@@ -1,4 +1,5 @@
1
1
  require 'bwapi/client/brandwatch/clients/command_center'
2
+ require 'bwapi/client/brandwatch/clients/grant_types'
2
3
  require 'bwapi/client/brandwatch/clients/users'
3
4
  require 'bwapi/client/brandwatch/clients/modules'
4
5
 
@@ -96,6 +97,7 @@ module BWAPI
96
97
  end
97
98
 
98
99
  include BWAPI::Client::Brandwatch::Clients::CommandCenter
100
+ include BWAPI::Client::Brandwatch::Clients::GrantTypes
99
101
  include BWAPI::Client::Brandwatch::Clients::Users
100
102
  include BWAPI::Client::Brandwatch::Clients::Modules
101
103
  end
@@ -8,15 +8,22 @@ module BWAPI
8
8
  # Get Vizia themes enabled for client
9
9
  #
10
10
  # TODO: Add parameters documentation
11
- def brandwatch_themes(client_id)
11
+ def brandwatch_client_themes(client_id)
12
12
  get "brandwatch/clients/#{client_id}/commandcenter/themes"
13
13
  end
14
14
 
15
- # Alter Vizia themes enabled for client
15
+ # Add Vizia themes to a client
16
16
  #
17
17
  # TODO: Add parameters documentation
18
- def brandwatch_update_themes(client_id, opts = {})
19
- get "brandwatch/clients/#{client_id}/commandcenter/themes", opts
18
+ def brandwatch_client_create_themes(client_id, theme_id)
19
+ post "brandwatch/clients/#{client_id}/commandcenter/themes/#{theme_id}"
20
+ end
21
+
22
+ # Remove Vizia themes from a client
23
+ #
24
+ # TODO: Add parameters documentation
25
+ def brandwatch_client_delete_themes(client_id, theme_id)
26
+ delete "brandwatch/clients/#{client_id}/commandcenter/themes/#{theme_id}"
20
27
  end
21
28
  end
22
29
  end
@@ -0,0 +1,38 @@
1
+ module BWAPI
2
+ class Client
3
+ module Brandwatch
4
+ module Clients
5
+ # GrantTypes module for brandwatch/clients/{client_id}/granttypes endpoints
6
+ module GrantTypes
7
+ # Retrieve grant type specified for given client, if a configured oAuth grant type constraint exists.
8
+ #
9
+ # TODO: Add parameters documentation
10
+ def get_grant_type(client_id, grant_type)
11
+ get "brandwatch/clients/#{client_id}/grantTypes/#{grant_type}"
12
+ end
13
+
14
+ # Create a new ClientGrantType constraint
15
+ #
16
+ # TODO: Add parameters documentation
17
+ def create_grant_type(opts = {})
18
+ post 'brandwatch/clients/grantTypes', opts
19
+ end
20
+
21
+ # Update an existing ClientGrantType constraint
22
+ #
23
+ # TODO: Add parameters documentation
24
+ def update_grant_type(opts = {})
25
+ put 'brandwatch/clients/grantTypes', opts
26
+ end
27
+
28
+ # Delete an existing ClientGrantType constraint
29
+ #
30
+ # TODO: Add parameters documentation
31
+ def delete_grant_type(opts = {})
32
+ delete 'brandwatch/clients/grantTypes', opts
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -7,9 +7,51 @@ module BWAPI
7
7
  # Get supported Vizia themes
8
8
  #
9
9
  # @return [Hash] All themes
10
- def brandwatch_all_themes
10
+ def brandwatch_themes
11
11
  get 'brandwatch/commandcenter/themes'
12
12
  end
13
+
14
+ # Get all enabled Vizia themes
15
+ #
16
+ # TODO: Add parameters documentation
17
+ def enabled_brandwatch_themes(opts = {})
18
+ get 'brandwatch/commandcenter/themes/enabled', opts
19
+ end
20
+
21
+ # Get a Vizia theme by name
22
+ #
23
+ # TODO: Add parameters documentation
24
+ def brandwatch_theme_by_name(theme_name, opts = {})
25
+ get "brandwatch/commandcenter/themes/name/#{theme_name}", opts
26
+ end
27
+
28
+ # Get a Vizia theme by ID
29
+ #
30
+ # TODO: Add parameters documentation
31
+ def brandwatch_theme_by_id(theme_id, opts = {})
32
+ get "brandwatch/commandcenter/themes/id/#{theme_id}", opts
33
+ end
34
+
35
+ # Create a new Vizia theme
36
+ #
37
+ # TODO: Add parameters documentation
38
+ def create_brandwatch_theme(opts = {})
39
+ post 'brandwatch/commandcenter/themes', opts
40
+ end
41
+
42
+ # Update an existing Vizia theme
43
+ #
44
+ # TODO: Add parameters documentation
45
+ def update_brandwatch_theme(opts = {})
46
+ put 'brandwatch/commandcenter/themes', opts
47
+ end
48
+
49
+ # Delete a Vizia theme
50
+ #
51
+ # TODO: Add parameters documentation
52
+ def delete_brandwatch_theme(opts = {})
53
+ delete 'brandwatch/commandcenter/themes', opts
54
+ end
13
55
  end
14
56
  end
15
57
  end
@@ -0,0 +1,22 @@
1
+ module BWAPI
2
+ class Client
3
+ module Brandwatch
4
+ # HostLocationOverrides module for brandwatch/hostLocationOverrides endpoints
5
+ module HostLocationOverrides
6
+ # Fetch all host location overrides
7
+ #
8
+ # TODO: Add parameters documentation
9
+ def host_location_overrides
10
+ get 'brandwatch/hostLocationOverrides'
11
+ end
12
+
13
+ # Fetch a host location override
14
+ #
15
+ # TODO: Add parameters documentation
16
+ def get_host_location_override(opts = {})
17
+ get 'brandwatch/hostLocationOverride', opts
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -10,6 +10,13 @@ module BWAPI
10
10
  get 'brandwatch/pricestructures'
11
11
  end
12
12
 
13
+ # Get the price structures available for a client
14
+ #
15
+ # TODO: Add parameters documentation
16
+ def get_client_price_structures(client_id)
17
+ get "/brandwatch/pricestructures/clients/#{client_id}"
18
+ end
19
+
13
20
  # Create a new price structure
14
21
  #
15
22
  # @param opts [Hash] options Hash of parameters
@@ -1,3 +1,5 @@
1
+ require 'bwapi/client/client/grant_types'
2
+
1
3
  module BWAPI
2
4
  class Client
3
5
  # Client module for client endpoints
@@ -15,6 +17,22 @@ module BWAPI
15
17
  def client_modules
16
18
  get 'client/modules'
17
19
  end
20
+
21
+ # Given a project id, retrieves the price structure associated with the client the project belongs to
22
+ #
23
+ # TODO: Add parameters documentation
24
+ def client_pricing(opts = {})
25
+ get '/client/pricing', opts
26
+ end
27
+
28
+ # Fetch usage report
29
+ #
30
+ # TODO: Add parameters documentation
31
+ def client_usage
32
+ get '/client/usage'
33
+ end
34
+
35
+ include BWAPI::Client::Client::GrantTypes
18
36
  end
19
37
  end
20
38
  end
@@ -0,0 +1,15 @@
1
+ module BWAPI
2
+ class Client
3
+ module Client
4
+ # GrantTypes module for client/grantTypes endpoints
5
+ module GrantTypes
6
+ # Retrieve current User's Client's grant type specified.
7
+ #
8
+ # TODO: Add parameters documentation
9
+ def client_grant_type(grant_type)
10
+ get "/client/grantTypes/#{grant_type}"
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -2,7 +2,7 @@ module BWAPI
2
2
  class Client
3
3
  module CommandCenter
4
4
  module Displays
5
- # Displays module for commandcenter/displays/messages endpoints
5
+ # Displays module for commandcenter/displays/message endpoints
6
6
  module Messages
7
7
  # Get the messages for an existing display
8
8
  #
@@ -54,7 +54,7 @@ module BWAPI
54
54
  # @option opts [Array] screenIds ScreenIds where message is shown
55
55
  # @return [Hash] Updated display message
56
56
  def update_message(display_id, message_id, opts = {})
57
- put "commandcenter/displays/#{display_id}/messages/#{message_id}", opts
57
+ put "commandcenter/displays/#{display_id}/message/#{message_id}", opts
58
58
  end
59
59
 
60
60
  # Delete an existing display message
@@ -63,7 +63,7 @@ module BWAPI
63
63
  # @param [Integer] message_id The message id
64
64
  # @return [Hash] Deleted display message
65
65
  def delete_message(display_id, message_id)
66
- delete "commandcenter/displays/#{display_id}/messages/#{message_id}"
66
+ delete "commandcenter/displays/#{display_id}/message/#{message_id}"
67
67
  end
68
68
  end
69
69
  end
@@ -25,7 +25,7 @@ module BWAPI
25
25
  # @param [Integer] user_id the user id
26
26
  # @return [Hash] Deleted user access level
27
27
  def delete_user_access_level(user_id)
28
- delete "commandcenter/users/#{user_id}"
28
+ delete "commandcenter/users/#{user_id}/"
29
29
  end
30
30
 
31
31
  include BWAPI::Client::CommandCenter::Users::Access
@@ -5,8 +5,8 @@ module BWAPI
5
5
  # Request the information for a given location code
6
6
  #
7
7
  # @return [Hash] Information about the location
8
- def location(location_code)
9
- get "locations/#{location_code}"
8
+ def location(id)
9
+ get "locations/#{id}"
10
10
  end
11
11
 
12
12
  # Locations a location name with candidates
@@ -6,6 +6,7 @@ require 'bwapi/client/projects/demographics'
6
6
  require 'bwapi/client/projects/ditto_queries'
7
7
  require 'bwapi/client/projects/facebook_queries'
8
8
  require 'bwapi/client/projects/group'
9
+ require 'bwapi/client/projects/preview_search'
9
10
  require 'bwapi/client/projects/queries'
10
11
  require 'bwapi/client/projects/query/mentionfind'
11
12
  require 'bwapi/client/projects/query_groups'
@@ -82,6 +83,20 @@ module BWAPI
82
83
  delete "projects/#{project_id}"
83
84
  end
84
85
 
86
+ # Given a query id retrieve the twitter audience csv associated with said query
87
+ #
88
+ # TODO: Add parameters documentation
89
+ def project_audiences(project_id, opts = {})
90
+ get "/projects/#{project_id}/audiences", opts
91
+ end
92
+
93
+ # Given a query id retrieve summary statistics for the given Twitter audience
94
+ #
95
+ # TODO: Add parameters documentation
96
+ def project_twitter_audience_summary(project_id, opts = {})
97
+ get "/projects/#{project_id}/twitteraudiencesummary", opts
98
+ end
99
+
85
100
  include BWAPI::Client::Projects::BulkActions
86
101
  include BWAPI::Client::Projects::Categories
87
102
  include BWAPI::Client::Projects::Data
@@ -90,6 +105,7 @@ module BWAPI
90
105
  include BWAPI::Client::Projects::DittoQueries
91
106
  include BWAPI::Client::Projects::FacebookQueries
92
107
  include BWAPI::Client::Projects::Group
108
+ include BWAPI::Client::Projects::PreviewSearch
93
109
  include BWAPI::Client::Projects::Queries
94
110
  include BWAPI::Client::Projects::Query::MentionFind
95
111
  include BWAPI::Client::Projects::QueryGroups
@@ -15,6 +15,13 @@ module BWAPI
15
15
  def bulk_edit_mentions(project_id, opts = {})
16
16
  post "projects/#{project_id}/bulkactions/mentions", opts
17
17
  end
18
+
19
+ # Create a mention delete bulk action
20
+ #
21
+ # TODO: Add parameters documentation
22
+ def bulk_delete_mentions(project_id, opts = {})
23
+ delete "/projects/#{project_id}/bulkactions/mentions", opts
24
+ end
18
25
  end
19
26
  end
20
27
  end
@@ -21,6 +21,13 @@ module BWAPI
21
21
  get "projects/#{project_id}/data/mentions", opts
22
22
  end
23
23
 
24
+ # Retrieve the total count of mentions for the requested queries
25
+ #
26
+ # TODO: Add parameters documentation
27
+ def data_mentions_count(project_id, opts = {})
28
+ get "/projects/#{project_id}/data/mentions/count", opts
29
+ end
30
+
24
31
  # Update mentions for project
25
32
  #
26
33
  # @param project_id [Integer] Id of project
@@ -12,7 +12,7 @@ module BWAPI
12
12
  # @option opts [Array] dateRanges Date range ids
13
13
  # @return [Hash] All Chart data mentions
14
14
  def data_volume_date_ranges_days(project_id, opts = {})
15
- get "projects/#{project_id}/data/volume/dataRanges/days", opts
15
+ get "projects/#{project_id}/data/volume/dateRanges/days", opts
16
16
  end
17
17
 
18
18
  # Get a sub (top 10, by volume) items of the sites dimension
@@ -60,17 +60,6 @@ module BWAPI
60
60
  get "projects/#{project_id}/data/volume/topauthors/queries", opts
61
61
  end
62
62
 
63
- # Get top authors for given query IDs alternative
64
- #
65
- # @param project_id [Integer] Id of project
66
- # @option opts [Hash] filter The filters to apply
67
- # @option opts [Integer] limit The limit to return
68
- # @option opts [String] orderBy Parameter to sort by
69
- # @option opts [String] orderDirection Direction of sort
70
- def data_volume_top_authors_queries_alt(project_id, opts = {})
71
- get "projects/#{project_id}/data/volume/topauthors/queries/alt", opts
72
- end
73
-
74
63
  # Get top sites for given query IDs
75
64
  #
76
65
  # @param project_id [Integer] Id of project
@@ -92,6 +81,13 @@ module BWAPI
92
81
  def data_volume_top_tweeters_queries(project_id, opts = {})
93
82
  get "projects/#{project_id}/data/volume/toptweeters/queries", opts
94
83
  end
84
+
85
+ # Returns top facebook users for given query IDs
86
+ #
87
+ # TODO: Add parameters documentation
88
+ def data_volume_top_facebook_users_queries(project_id, opts = {})
89
+ get "/projects/#{project_id}/data/volume/topfacebookusers/queries", opts
90
+ end
95
91
  end
96
92
  end
97
93
  end
@@ -16,10 +16,10 @@ module BWAPI
16
16
  # Get a specific data download in project
17
17
  #
18
18
  # @param project_id [Integer] Id of project
19
- # @param data_download_id [Integer] Id of data download
19
+ # @param download_id [Integer] Id of data download
20
20
  # @return [Hash] Specific data download
21
- def get_data_download(project_id, data_download_id)
22
- get "projects/#{project_id}/datadownload/#{data_download_id}"
21
+ def get_data_download(project_id, download_id)
22
+ get "projects/#{project_id}/datadownload/#{download_id}"
23
23
  end
24
24
 
25
25
  # Create a new data download in project
@@ -18,14 +18,14 @@ module BWAPI
18
18
  # Update an existing ditto query in a project
19
19
  #
20
20
  # @param project_id [Integer] Id of project
21
- # @param ditto_query_id [Integer] Id of query
21
+ # @param query_id [Integer] Id of query
22
22
  # @param opts [Hash] options hash of parameters
23
23
  # @option opts [Integer] id Id of the query
24
24
  # @option opts [String] name Name of the query
25
25
  # @options opts [Integer] dittoBrandId The ditto brand id
26
26
  # @return [Hash] Updated ditto query
27
- def update_ditto_query(project_id, ditto_query_id, opts = {})
28
- put "projects/#{project_id}/dittoqueries/#{ditto_query_id}", opts
27
+ def update_ditto_query(project_id, query_id, opts = {})
28
+ put "projects/#{project_id}/dittoqueries/#{query_id}", opts
29
29
  end
30
30
  end
31
31
  end
@@ -88,6 +88,13 @@ module BWAPI
88
88
  def update_facebook_query(project_id, query_id, opts = {})
89
89
  put "projects/#{project_id}/facebookqueries/#{query_id}", opts
90
90
  end
91
+
92
+ # Delete a Facebook query
93
+ #
94
+ # TODO: Add parameters documentation
95
+ def delete_facebook_query(project_id, query_id)
96
+ delete "/projects/#{project_id}/facebookqueries/#{query_id}"
97
+ end
91
98
  end
92
99
  end
93
100
  end
@@ -0,0 +1,15 @@
1
+ module BWAPI
2
+ class Client
3
+ module Projects
4
+ # PreviewSearch module for projects/{projectId}/previewsearch endpoints
5
+ module PreviewSearch
6
+ # Create a project preview search for mentions
7
+ #
8
+ # TODO: Add parameters documentation
9
+ def project_preview_search_mentions(project_id)
10
+ post "/projects/#{project_id}/previewsearch/mentions"
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -8,40 +8,40 @@ module BWAPI
8
8
  #
9
9
  # @param project_id [Integer] Id of project
10
10
  # @param query_id [Integer] Id of query
11
- # @param mention_id [Integer] Id of mention
11
+ # @param id [Integer] Id of mention
12
12
  # @return [Hash] Content of query mention
13
- def get_query_mention_content(project_id, query_id, mention_id)
14
- get "projects/#{project_id}/queries/#{query_id}/mentions/#{mention_id}/content"
13
+ def get_query_mention_content(project_id, query_id, id)
14
+ get "projects/#{project_id}/queries/#{query_id}/mentions/#{id}/content"
15
15
  end
16
16
 
17
17
  # Update query mention
18
18
  #
19
19
  # @param project_id [Integer] Id of project
20
20
  # @param query_id [Integer] Id of query
21
- # @param mention_id [Integer] Id of mention
21
+ # @param id [Integer] Id of mention
22
22
  # @param opts [Hash] options hash of parameters
23
23
  # @option opts [Integer] projectId Id of the project
24
24
  # @option opts [Integer] queryId Id of the query
25
25
  # @option opts [Integer] id Id of the mention
26
26
  # @option opts [Hash] MentionPatchDTO patch to be applied
27
27
  # @return [Hash] Updated query mention
28
- def update_query_mention(project_id, query_id, mention_id, opts = {})
29
- patch "projects/#{project_id}/queries/#{query_id}/mentions/#{mention_id}", opts
28
+ def update_query_mention(project_id, query_id, id, opts = {})
29
+ patch "projects/#{project_id}/queries/#{query_id}/mentions/#{id}", opts
30
30
  end
31
31
 
32
32
  # Delete query mention
33
33
  #
34
34
  # @param project_id [Integer] Id of project
35
35
  # @param query_id [Integer] Id of query
36
- # @param mention_id [Integer] Id of mention
36
+ # @param id [Integer] Id of mention
37
37
  # @param opts [Hash] options hash of parameters
38
38
  # @option opts [Integer] projectId Id of the project
39
39
  # @option opts [Integer] queryId Id of the query
40
40
  # @option opts [Integer] id Id of the mention
41
41
  # @option opts [Hash] Map patch to be applied
42
42
  # @return [Hash] Deleted query mention
43
- def delete_query_mention(project_id, query_id, mention_id, opts = {})
44
- delete "projects/#{project_id}/queries/#{query_id}/mentions/#{mention_id}", opts
43
+ def delete_query_mention(project_id, query_id, id, opts = {})
44
+ delete "projects/#{project_id}/queries/#{query_id}/mentions/#{id}", opts
45
45
  end
46
46
  end
47
47
  end
@@ -5,21 +5,6 @@ module BWAPI
5
5
  module Projects
6
6
  # Signals module for projects/signals endpoints
7
7
  module Signals
8
- # Get all signals belonging to user in project
9
- #
10
- # @param project_id [Integer] Id of project
11
- # @param opts [Hash] options hash of parameters
12
- # @option opts [Integer] id Id of the query
13
- # @option opts [Integer] page Page of projects to retrieve
14
- # @option opts [Integer] pageSize Results per page of results
15
- # @option opts [Integer] importance Importance of signal
16
- # @option opts [String] type Type of signal
17
- # @option opts [Hash] filter The filter(s) to apply
18
- # @return [Hash] All signals for user in project
19
- def signals(project_id, opts = {})
20
- get "projects/#{project_id}/signals", opts
21
- end
22
-
23
8
  include BWAPI::Client::Projects::Signals::Groups
24
9
  end
25
10
  end
@@ -76,6 +76,13 @@ module BWAPI
76
76
  def update_twitter_query(project_id, query_id, opts = {})
77
77
  put "projects/#{project_id}/twitterqueries/#{query_id}", opts
78
78
  end
79
+
80
+ # Delete a Twitter query
81
+ #
82
+ # TODO: Add parameters documentation
83
+ def delete_twitter_query(project_id, query_id)
84
+ delete "/projects/#{project_id}/twitterqueries/#{query_id}"
85
+ end
79
86
  end
80
87
  end
81
88
  end
@@ -0,0 +1,13 @@
1
+ module BWAPI
2
+ class Client
3
+ # Public module for public endpoints
4
+ module Public
5
+ # Given the correct credentials unsubscribe a subscriber from a signal group
6
+ #
7
+ # TODO: Add parameters documentation
8
+ def public_signals_unsubscribe(opts = {})
9
+ post '/public/signals/group/unsubscribe', opts
10
+ end
11
+ end
12
+ end
13
+ end
@@ -12,6 +12,13 @@ module BWAPI
12
12
  def sso(user_id)
13
13
  get "sso/#{user_id}"
14
14
  end
15
+
16
+ # Endpoints to manage users using SSO keys
17
+ #
18
+ # TODO: Add parameters documentation
19
+ def sso_user(opts = {})
20
+ get 'sso/user', opts
21
+ end
15
22
  end
16
23
  end
17
24
  end
@@ -1,5 +1,8 @@
1
+ require 'bwapi/client/user/facebook'
1
2
  require 'bwapi/client/user/instagram_credentials'
2
3
  require 'bwapi/client/user/notifications'
4
+ require 'bwapi/client/user/tokens'
5
+ require 'bwapi/client/user/twitter_credentials'
3
6
 
4
7
  module BWAPI
5
8
  class Client
@@ -38,6 +41,62 @@ module BWAPI
38
41
  put 'user', opts
39
42
  end
40
43
 
44
+ # Change password
45
+ #
46
+ # TODO: Add parameters documentation
47
+ def change_password(opts = {})
48
+ put '/user/changePassword', opts
49
+ end
50
+
51
+ # Reset password for user
52
+ #
53
+ # TODO: Add parameters documentation
54
+ def reset_password(opts = {})
55
+ post '/user/resetPassword', opts
56
+ end
57
+
58
+ # Send reset password email
59
+ #
60
+ # TODO: Add parameters documentation
61
+ def send_reset_password_email(opts = {})
62
+ post '/user/sendResetPasswordEmail', opts
63
+ end
64
+
65
+ # Generate 2FA key for the current user
66
+ #
67
+ # TODO: Add parameters documentation
68
+ def generate_two_factor_auth(opts = {})
69
+ post '/user/generateTwoFactorAuthKey', opts
70
+ end
71
+
72
+ # Enable 2FA for current user
73
+ #
74
+ # TODO: Add parameters documentation
75
+ def enable_two_factor_auth(opts = {})
76
+ post '/user/enableTwoFactorAuth', opts
77
+ end
78
+
79
+ # Verify OTP code
80
+ #
81
+ # TODO: Add parameters documentation
82
+ def verify_code(opts = {})
83
+ get '/user/verifyCode', opts
84
+ end
85
+
86
+ # Send authentication code
87
+ #
88
+ # TODO: Add parameters documentation
89
+ def send_code(opts = {})
90
+ post '/user/sendCode', opts
91
+ end
92
+
93
+ # Get Spredfast integration for current user
94
+ #
95
+ # TODO: Add parameters documentation
96
+ def user_spredfast
97
+ get '/user/spredfast'
98
+ end
99
+
41
100
  # Get users api role
42
101
  #
43
102
  # @return [String] Users api role
@@ -52,8 +111,11 @@ module BWAPI
52
111
  user.uiRole
53
112
  end
54
113
 
114
+ include BWAPI::Client::User::Facebook
55
115
  include BWAPI::Client::User::InstagramCredentials
56
116
  include BWAPI::Client::User::Notifications
117
+ include BWAPI::Client::User::Tokens
118
+ include BWAPI::Client::User::TwitterCredentials
57
119
  end
58
120
  end
59
121
  end
@@ -0,0 +1,15 @@
1
+ module BWAPI
2
+ class Client
3
+ module User
4
+ # Facebook module for user/facebook endpoints
5
+ module Facebook
6
+ # Check status of Facebook queries
7
+ #
8
+ # TODO: Add parameters documentation
9
+ def facebook_issues
10
+ get '/user/facebook/issues'
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,22 @@
1
+ module BWAPI
2
+ class Client
3
+ module User
4
+ # Tokens module for user/tokens endpoints
5
+ module Tokens
6
+ # Get all active API access tokens owned by the current user
7
+ #
8
+ # TODO: Add parameters documentation
9
+ def user_tokens(opts = {})
10
+ get '/user/tokens', opts
11
+ end
12
+
13
+ # Remove a token
14
+ #
15
+ # TODO: Add parameters documentation
16
+ def delete_user_token(access_token)
17
+ delete "/user/tokens/#{access_token}"
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,29 @@
1
+ module BWAPI
2
+ class Client
3
+ module User
4
+ # TwitterCredentials module for user/twittercredentials endpoints
5
+ module TwitterCredentials
6
+ # Retrieve the current user's Twitter credentials
7
+ #
8
+ # TODO: Add parameters documentation
9
+ def twitter_credentials
10
+ get '/user/twittercredentials'
11
+ end
12
+
13
+ # Update the current user's Twitter credentials
14
+ #
15
+ # TODO: Add parameters documentation
16
+ def update_twitter_credentials
17
+ put '/user/twittercredentials'
18
+ end
19
+
20
+ # Delete the current user's Twitter credentials
21
+ #
22
+ # TODO: Add parameters documentation
23
+ def delete_twitter_credentials
24
+ delete '/user/twittercredentials'
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
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: 11.0.1.pre.563
4
+ version: 11.0.1.pre.568
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Chrisp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-02 00:00:00.000000000 Z
11
+ date: 2015-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -144,11 +144,13 @@ files:
144
144
  - lib/bwapi/client.rb
145
145
  - lib/bwapi/client/admin.rb
146
146
  - lib/bwapi/client/admin/become.rb
147
+ - lib/bwapi/client/admin/clients.rb
147
148
  - lib/bwapi/client/admin/clients/sub_clients.rb
148
149
  - lib/bwapi/client/admin/clients/user_groups.rb
149
150
  - lib/bwapi/client/admin/clients/users.rb
150
151
  - lib/bwapi/client/admin/clients/users/sharing.rb
151
152
  - lib/bwapi/client/admin/demographics.rb
153
+ - lib/bwapi/client/admin/reseller.rb
152
154
  - lib/bwapi/client/admin/search.rb
153
155
  - lib/bwapi/client/aggregates.rb
154
156
  - lib/bwapi/client/author.rb
@@ -161,16 +163,19 @@ files:
161
163
  - lib/bwapi/client/brandwatch/clients/command_center/themes.rb
162
164
  - lib/bwapi/client/brandwatch/clients/command_center/users.rb
163
165
  - lib/bwapi/client/brandwatch/clients/command_center/users/access.rb
166
+ - lib/bwapi/client/brandwatch/clients/grant_types.rb
164
167
  - lib/bwapi/client/brandwatch/clients/modules.rb
165
168
  - lib/bwapi/client/brandwatch/clients/users.rb
166
169
  - lib/bwapi/client/brandwatch/command_center.rb
167
170
  - lib/bwapi/client/brandwatch/command_center/scene_types.rb
168
171
  - lib/bwapi/client/brandwatch/command_center/themes.rb
169
172
  - lib/bwapi/client/brandwatch/ditto_brands.rb
173
+ - lib/bwapi/client/brandwatch/host_location_overrides.rb
170
174
  - lib/bwapi/client/brandwatch/log_level.rb
171
175
  - lib/bwapi/client/brandwatch/price_structures.rb
172
176
  - lib/bwapi/client/brandwatch/usage_report.rb
173
177
  - lib/bwapi/client/client.rb
178
+ - lib/bwapi/client/client/grant_types.rb
174
179
  - lib/bwapi/client/command_center.rb
175
180
  - lib/bwapi/client/command_center/category_colours.rb
176
181
  - lib/bwapi/client/command_center/client.rb
@@ -233,6 +238,7 @@ files:
233
238
  - lib/bwapi/client/projects/group/author_group.rb
234
239
  - lib/bwapi/client/projects/group/location_group.rb
235
240
  - lib/bwapi/client/projects/group/site_group.rb
241
+ - lib/bwapi/client/projects/preview_search.rb
236
242
  - lib/bwapi/client/projects/queries.rb
237
243
  - lib/bwapi/client/projects/queries/backfill.rb
238
244
  - lib/bwapi/client/projects/queries/date_range.rb
@@ -252,12 +258,16 @@ files:
252
258
  - lib/bwapi/client/projects/twitter_queries.rb
253
259
  - lib/bwapi/client/projects/users.rb
254
260
  - lib/bwapi/client/projects/workflow.rb
261
+ - lib/bwapi/client/public.rb
255
262
  - lib/bwapi/client/query_validation.rb
256
263
  - lib/bwapi/client/sso.rb
257
264
  - lib/bwapi/client/test_search.rb
258
265
  - lib/bwapi/client/user.rb
266
+ - lib/bwapi/client/user/facebook.rb
259
267
  - lib/bwapi/client/user/instagram_credentials.rb
260
268
  - lib/bwapi/client/user/notifications.rb
269
+ - lib/bwapi/client/user/tokens.rb
270
+ - lib/bwapi/client/user/twitter_credentials.rb
261
271
  - lib/bwapi/configuration.rb
262
272
  - lib/bwapi/connection.rb
263
273
  - lib/bwapi/default.rb