bwapi 9.1.0.pre.432 → 9.2.0.pre.440

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTk3ZmMwMGU3YTJhZjJhZTZiMTEzNjE0OTNhOWNhZmZhNTdlMGU2Ng==
4
+ YTE3OTAxNjU4MDEzNTg3NWVlM2ZmMTRjN2EzMDhlOTZkYWFiMTlkZA==
5
5
  data.tar.gz: !binary |-
6
- MDI2MzVmOWE1ZGJiMDQ1NjEzYzc3ZjhhZTdhMGM0Zjg1NTc3OThkOA==
6
+ NTYxNGNlYjAyMjBkMTBhNWU5MTQ2Y2FkZTAzYzcxOTdkNDMzMjA3OA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDg1MmY0MjVkNmQwOGFiYTdiNDllODAwMmI5MTBkNjc2Yzk2ODdiYjI1YWZi
10
- ZjM1ZTgyYzBkMWQyNzBhODMxZmM3ZTI4YWFiNjAzNGQ4OWIyMjJjNjE3ODRm
11
- NjJkYjYyODc4MDI0YjYxODM1ZDVmMzhjMjFkMzNkZDBlOGFjMDY=
9
+ YTQ0MmM0OTliZTBiZGJkOTQ5NmI2NDVlMDI3MzBiNzcwZGQyYTIzYjM5MGFh
10
+ YjMwM2M2MGNkOTE2Y2VlNWU5MGE4MTU1MDM3NDMwZGY4ZTNiZWY5MTExM2M0
11
+ NjhkNGNkZjhiNmUzODY0NzgzNjI2NDVhODFhZDVjZWI4OGIyMGM=
12
12
  data.tar.gz: !binary |-
13
- YWE1MDkyYTI2NDgyODNiZWM5ZDExOWMwMTc4OTQyMWFmNDc3OTRjNjgyYTgx
14
- YzU1NTNjODY3ZWUwMjAwN2Q3MDZjMmQ4YjM0ZWUyZjMzZTQxNjkyMWZlOWUw
15
- YmJlYWQ2MzM1Y2EzOGYwZjA5YzY2MDkwYmFlYjk2YjI1ODQxMzc=
13
+ Zjc5Mzg4NzliMzViY2Q3MTQ2NjdhZjhkNjIwZDgwMDNlZjU2Zjc0MmExNDNh
14
+ YWUzNWQ5MjA1ZGE0M2M5NmU5NjZlOGU4NmE4ZWJkODRlZWUwZTJkZDA4MGJm
15
+ MjQ2MjY0MTQ3ZmQ4YmVmOWFmZGNmMmE2ZDgwOGI0YWZmMWIzZmE=
@@ -1,6 +1,10 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## 9.2.0
5
+ ### Added
6
+ * NoTask - added admin clients usergroups endpoints
7
+
4
8
  ## 9.1.0
5
9
  ### Added
6
10
  * NoTask - added parent client endpoints
@@ -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-10-01'
7
+ s.date = '2014-10-09'
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,7 +1,8 @@
1
1
  require 'bwapi/client/admin/become'
2
2
  require 'bwapi/client/admin/search'
3
- require 'bwapi/client/admin/sub_clients'
4
- require 'bwapi/client/admin/users'
3
+ require 'bwapi/client/admin/clients/sub_clients'
4
+ require 'bwapi/client/admin/clients/users'
5
+ require 'bwapi/client/admin/clients/user_groups'
5
6
 
6
7
  module BWAPI
7
8
  class Client
@@ -25,10 +26,11 @@ module BWAPI
25
26
  get 'admin/sharing-report'
26
27
  end
27
28
 
28
- include BWAPI::Client::Admin::Clients::Become
29
+ include BWAPI::Client::Admin::Become
30
+ include BWAPI::Client::Admin::Search
29
31
  include BWAPI::Client::Admin::Clients::SubClients
30
- include BWAPI::Client::Admin::Clients::Search
31
32
  include BWAPI::Client::Admin::Clients::Users
33
+ include BWAPI::Client::Admin::Clients::UserGroups
32
34
  end
33
35
  end
34
36
  end
@@ -1,18 +1,16 @@
1
1
  module BWAPI
2
2
  class Client
3
3
  module Admin
4
- module Clients
5
- # Become module for admin/become endpoint
6
- module Become
7
- # Become user
8
- #
9
- # @note must be a client admin user
10
- #
11
- # @param user_id [Integer] The user id
12
- # @return [Hash] User credentials
13
- def admin_become(user_id)
14
- get "admin/become/#{user_id}"
15
- end
4
+ # Become module for admin/become endpoint
5
+ module Become
6
+ # Become user
7
+ #
8
+ # @note must be a client admin user
9
+ #
10
+ # @param user_id [Integer] The user id
11
+ # @return [Hash] User credentials
12
+ def admin_become(user_id)
13
+ get "admin/become/#{user_id}"
16
14
  end
17
15
  end
18
16
  end
@@ -0,0 +1,44 @@
1
+ module BWAPI
2
+ class Client
3
+ module Admin
4
+ module Clients
5
+ # UserGroups module for admin/usergroups endpoints
6
+ module UserGroups
7
+ # Get all user groups
8
+ #
9
+ # @param client_id [Integer] Id of the client
10
+ # @option opts [Integer] page Page of projects to retrieve
11
+ # @option opts [Integer] pageSize Results per page of results
12
+ def client_user_groups(client_id)
13
+ get "admin/clients/#{client_id}/usergroups"
14
+ end
15
+
16
+ # Create new user group
17
+ #
18
+ # @param client_id [Integer] Id of the client
19
+ # @param opts [Hash] options hash of parameters
20
+ # @option opts [Date] startDate Start date of the client
21
+ def create_client_user_group(client_id, opts = {})
22
+ post "admin/clients/#{client_id}/usergroups", opts
23
+ end
24
+
25
+ # Update existing user group
26
+ #
27
+ # @param client_id [Integer] Id of the client
28
+ # @param user_group_id [Integer] Id of the user group
29
+ def update_client_user_group(client_id, user_group_id, opts = {})
30
+ put "admin/clients/#{client_id}/usergroups/#{user_group_id}", opts
31
+ end
32
+
33
+ # Delete specific user group
34
+ #
35
+ # @param client_id [Integer] Id of the client
36
+ # @param user_group_id [Integer] Id of the user group
37
+ def delete_client_user_group(client_id, user_group_id)
38
+ delete "admin/clients/#{client_id}/usergroups/#{user_group_id}"
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
@@ -1,4 +1,4 @@
1
- require 'bwapi/client/admin/users/sharing'
1
+ require 'bwapi/client/admin/clients/users/sharing'
2
2
 
3
3
  module BWAPI
4
4
  class Client
@@ -1,35 +1,33 @@
1
1
  module BWAPI
2
2
  class Client
3
3
  module Admin
4
- module Clients
5
- # Search module for admin/search endpoints
6
- module Search
7
- # Get a list of queries
8
- #
9
- # @param opts [Hash] options hash of parameters
10
- # @option opts [Integer] text Text expression
11
- # @return [Hash] List of queries
12
- def search_query_text(opts = {})
13
- get 'admin/search/querytext', opts
14
- end
4
+ # Search module for admin/search endpoints
5
+ module Search
6
+ # Get a list of queries
7
+ #
8
+ # @param opts [Hash] options hash of parameters
9
+ # @option opts [Integer] text Text expression
10
+ # @return [Hash] List of queries
11
+ def search_query_text(opts = {})
12
+ get 'admin/search/querytext', opts
13
+ end
15
14
 
16
- # Get a list of query names
17
- #
18
- # @param opts [Hash] options hash of parameters
19
- # @option opts [Integer] text Text expression
20
- # @return [Hash] List of query names
21
- def search_query_name(opts = {})
22
- get 'admin/search/queryname', opts
23
- end
15
+ # Get a list of query names
16
+ #
17
+ # @param opts [Hash] options hash of parameters
18
+ # @option opts [Integer] text Text expression
19
+ # @return [Hash] List of query names
20
+ def search_query_name(opts = {})
21
+ get 'admin/search/queryname', opts
22
+ end
24
23
 
25
- # Get a list of rules
26
- #
27
- # @param opts [Hash] options hash of parameters
28
- # @option opts [Integer] text Text expression
29
- # @return [Hash] List of rules
30
- def search_rule_text(opts = {})
31
- get 'admin/search/ruletext', opts
32
- end
24
+ # Get a list of rules
25
+ #
26
+ # @param opts [Hash] options hash of parameters
27
+ # @option opts [Integer] text Text expression
28
+ # @return [Hash] List of rules
29
+ def search_rule_text(opts = {})
30
+ get 'admin/search/ruletext', opts
33
31
  end
34
32
  end
35
33
  end
@@ -1,4 +1,4 @@
1
1
  # BWAPI Version
2
2
  module BWAPI
3
- VERSION = '9.1.0'
3
+ VERSION = '9.2.0'
4
4
  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: 9.1.0.pre.432
4
+ version: 9.2.0.pre.440
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-10-01 00:00:00.000000000 Z
11
+ date: 2014-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -130,10 +130,11 @@ files:
130
130
  - lib/bwapi/client.rb
131
131
  - lib/bwapi/client/admin.rb
132
132
  - lib/bwapi/client/admin/become.rb
133
+ - lib/bwapi/client/admin/clients/sub_clients.rb
134
+ - lib/bwapi/client/admin/clients/user_groups.rb
135
+ - lib/bwapi/client/admin/clients/users.rb
136
+ - lib/bwapi/client/admin/clients/users/sharing.rb
133
137
  - lib/bwapi/client/admin/search.rb
134
- - lib/bwapi/client/admin/sub_clients.rb
135
- - lib/bwapi/client/admin/users.rb
136
- - lib/bwapi/client/admin/users/sharing.rb
137
138
  - lib/bwapi/client/brandwatch.rb
138
139
  - lib/bwapi/client/brandwatch/become.rb
139
140
  - lib/bwapi/client/brandwatch/client_modules.rb