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 +8 -8
- data/CHANGELOG.md +4 -0
- data/bwapi.gemspec +1 -1
- data/lib/bwapi/client/admin.rb +6 -4
- data/lib/bwapi/client/admin/become.rb +10 -12
- data/lib/bwapi/client/admin/{sub_clients.rb → clients/sub_clients.rb} +0 -0
- data/lib/bwapi/client/admin/clients/user_groups.rb +44 -0
- data/lib/bwapi/client/admin/{users.rb → clients/users.rb} +1 -1
- data/lib/bwapi/client/admin/{users → clients/users}/sharing.rb +0 -0
- data/lib/bwapi/client/admin/search.rb +25 -27
- data/lib/bwapi/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
YTE3OTAxNjU4MDEzNTg3NWVlM2ZmMTRjN2EzMDhlOTZkYWFiMTlkZA==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
NTYxNGNlYjAyMjBkMTBhNWU5MTQ2Y2FkZTAzYzcxOTdkNDMzMjA3OA==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
YTQ0MmM0OTliZTBiZGJkOTQ5NmI2NDVlMDI3MzBiNzcwZGQyYTIzYjM5MGFh
|
|
10
|
+
YjMwM2M2MGNkOTE2Y2VlNWU5MGE4MTU1MDM3NDMwZGY4ZTNiZWY5MTExM2M0
|
|
11
|
+
NjhkNGNkZjhiNmUzODY0NzgzNjI2NDVhODFhZDVjZWI4OGIyMGM=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
Zjc5Mzg4NzliMzViY2Q3MTQ2NjdhZjhkNjIwZDgwMDNlZjU2Zjc0MmExNDNh
|
|
14
|
+
YWUzNWQ5MjA1ZGE0M2M5NmU5NjZlOGU4NmE4ZWJkODRlZWUwZTJkZDA4MGJm
|
|
15
|
+
MjQ2MjY0MTQ3ZmQ4YmVmOWFmZGNmMmE2ZDgwOGI0YWZmMWIzZmE=
|
data/CHANGELOG.md
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-10-
|
|
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'
|
data/lib/bwapi/client/admin.rb
CHANGED
|
@@ -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::
|
|
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
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
|
File without changes
|
|
@@ -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
|
|
File without changes
|
|
@@ -1,35 +1,33 @@
|
|
|
1
1
|
module BWAPI
|
|
2
2
|
class Client
|
|
3
3
|
module Admin
|
|
4
|
-
module
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
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: 9.
|
|
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-
|
|
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
|