bwapi 6.2.0.pre.205 → 6.3.0.pre.222

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NGNmODJhOWM0NjIxMjIxNmVkOTAyY2QzZjZiYTBlZTdmOWMyYzY1NA==
4
+ N2ZmNjM4NDI0OTJhZTMyNWNjODg2NDcxMzIxNmJhMGUzMzk4ZjQ1MA==
5
5
  data.tar.gz: !binary |-
6
- MmFmOTI2ZTBmODYxNzdkZDc4NDcwMzFmODNmODJmNTgzZjYwNDU3Mw==
6
+ YTNjOTRkYjM3MzIxNzkyOGIyYWNkODY3ZTRiOWFiNWY3NTAxMTNhYQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZGY3ZDVmYTc5MmJiZDQ3MGQwZGQ4MzBhYTQ2MGNhYmRjZDY5Y2QxN2E5MmZm
10
- ZGVmNTk1OTIwNTY0ZjdlOTg2ZDM3ODFkNDRmZmI3YWQ5NDFjZWUwNDE0OGU3
11
- YjljYzE3N2RiOTIzMGZmYjM5MmIwZTY2NWMyMGUyYjZlNTJlMGQ=
9
+ NDU5NThjODhmZDlmMWM1N2Q5ODlhZjM3OGI2OGI5YjczMWM0MDhlNmU2MzBm
10
+ ZjU4ZDExNDVkMmU4NzRlMWQ0NzkyOTMxMzAzMGZhNDk3MjIwZjJkMGI3ODE0
11
+ ZTRlYzdjOTdmNTBhZGU0YzI5ZmY5OWIyYmQ4ZjkwNDc3ZGI3Y2U=
12
12
  data.tar.gz: !binary |-
13
- OTg5OTMzZTcyMzkyNTMyYWM4NWE0NzJmOTFmNjAyZmE0ZjgyNjlmNGJlYzZi
14
- OTk1Y2YwM2YyODQ5NzA1OGE0YjMyZDM0Y2JlNDU4MTFhNTliM2YxMzc0Mjhi
15
- YzI2MDE1ZDQ4OTIzZDg2NTEzMTdiMWYwYTk1YjU5ZjY5ZmNhYzU=
13
+ MDViY2UxY2ZiYzcwNTI0ODljZWZlODU2MzQ3YzZhMjJhNmViNTExNGZkZTlm
14
+ MmQ2MzM4MzE5MDNkZGNiZDg3NjZhODJhMmRjZjIwYmNkNzM3ZjllZWEzMDlm
15
+ NGJlYTI5YzY0MGFkYTM3NGU0OTBlYWEzOTQ3NWMzMzEwNTdjZjI=
data/README.md CHANGED
@@ -9,12 +9,12 @@
9
9
 
10
10
  __PLEASE NOTE THAT THIS PROJECT IS NOT OFFICIALLY SUPPORTED BY BRANDWATCH__
11
11
 
12
- A Ruby interface to the Brandwatch V2 API. The projects design is modelled on the GitHub Octokit wrapper which can be found here: https://github.com/octokit/octokit.rb.
12
+ A Ruby interface to the Brandwatch V2 API.
13
13
 
14
- ## Documentation
14
+ ## Documentation
15
15
  http://rubydoc.info/gems/bwapi/
16
16
 
17
- ## Getting Started
17
+ ## Getting Started
18
18
  All Brandwatch API calls at present require you to be authenticated, therefore you'll need to create an instance of a client and call login immediately:
19
19
 
20
20
  ```ruby
@@ -68,7 +68,7 @@ bw.log.info 'logging information'
68
68
  The above will only work if you enabled debug when creating your client.
69
69
 
70
70
  ## Contributing
71
- If you would like to contribute to this project please fork, create your new feature and then submit a PR merging into the `staging` branch. Once the feature is merged I'll update the version number and date in the gemspec and merge to master.
71
+ If you would like to contribute to this project please fork, create your new feature and then submit a PR merging into the `staging` branch. Once the feature is merged I'll update the version number and date in the gemspec and merge to master.
72
72
 
73
73
  Once the staging branch is merged into master a pre-release gem will automatically be created via travis. Subject to no issues being found the new version of the gem will be pushed to RubyGems.
74
74
 
@@ -78,7 +78,7 @@ There are a number of unit tests which are included as part of this project, ple
78
78
  ```ruby
79
79
  rspec spec
80
80
  ```
81
-
81
+
82
82
  Please note that a number of tests still need to be added so I don't currently have complete coverage, subject to workload these will be slowly added over the next few months.
83
83
 
84
84
  ## Feedback
@@ -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-02-14'
7
+ s.date = '2014-02-19'
8
8
  s.summary = 'Brandwatch API Wrapper'
9
9
  s.description = 'A Ruby wrapper for the Brandwatch API'
10
10
  s.author = 'Jonathan Chrisp'
@@ -5,6 +5,7 @@ require 'bwapi/request'
5
5
  require 'bwapi/client/admin'
6
6
  require 'bwapi/client/brandwatch'
7
7
  require 'bwapi/client/client'
8
+ require 'bwapi/client/command_center'
8
9
  require 'bwapi/client/error_codes'
9
10
  require 'bwapi/client/filters'
10
11
  require 'bwapi/client/languages'
@@ -41,6 +42,7 @@ module BWAPI
41
42
  include BWAPI::Client::Admin
42
43
  include BWAPI::Client::Brandwatch
43
44
  include BWAPI::Client::Client
45
+ include BWAPI::Client::CommandCenter
44
46
  include BWAPI::Client::ErrorCodes
45
47
  include BWAPI::Client::Filters
46
48
  include BWAPI::Client::Languages
@@ -0,0 +1,20 @@
1
+ require 'bwapi/client/command_center/client'
2
+ require 'bwapi/client/command_center/displays'
3
+ require 'bwapi/client/command_center/scene_types'
4
+ require 'bwapi/client/command_center/themes'
5
+ require 'bwapi/client/command_center/users'
6
+
7
+ module BWAPI
8
+ class Client
9
+ # CommandCenter module for commandcenter endpoints
10
+ module CommandCenter
11
+
12
+ include BWAPI::Client::CommandCenter::Client
13
+ include BWAPI::Client::CommandCenter::Displays
14
+ include BWAPI::Client::CommandCenter::SceneTypes
15
+ include BWAPI::Client::CommandCenter::Themes
16
+ include BWAPI::Client::CommandCenter::Users
17
+
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,17 @@
1
+ module BWAPI
2
+ class Client
3
+ module CommandCenter
4
+ # Themes module for commandcenter/themes endpoints
5
+ module Client
6
+
7
+ # Get vizia client information
8
+ #
9
+ # @return [Hashie::Mash] All themes
10
+ def vizia_client
11
+ get "commandcenter/client"
12
+ end
13
+
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,76 @@
1
+ require 'bwapi/client/command_center/displays/events'
2
+ require 'bwapi/client/command_center/displays/messages'
3
+ require 'bwapi/client/command_center/displays/scenes'
4
+ require 'bwapi/client/command_center/displays/screens'
5
+ require 'bwapi/client/command_center/displays/users'
6
+
7
+ module BWAPI
8
+ class Client
9
+ module CommandCenter
10
+ # Displays module for commandcenter/displays endpoints
11
+ module Displays
12
+
13
+ # Get the displays visible to the user
14
+ #
15
+ # @return [Hashie::Mash] All displays
16
+ def displays
17
+ get "commandcenter/displays"
18
+ end
19
+
20
+ # Get an existing display
21
+ #
22
+ # @param [Integer] display_id the display id
23
+ # @return [Hashie::Mash] Specific display
24
+ def get_display display_id
25
+ get "commandcenter/displays/#{display_id}"
26
+ end
27
+
28
+ # Create a new display
29
+ #
30
+ # @param opts [Hash] options hash of parameters
31
+ # @option opts [Integer] id The id of display
32
+ # @option opts [String] name The name of the display
33
+ # @option opts [Hash] options Display options
34
+ # @option opts [Array] screenIds Screen ids used to display
35
+ # @option opts [Boolean] active Whether display is active
36
+ # @option opts [String] created Date display was created
37
+ # @option opts [Boolean] enabled Whether display is enabled
38
+ # @return [Hashie::Mash] New display
39
+ def create_display opts={}
40
+ post "commandcenter/displays", opts
41
+ end
42
+
43
+ # Update an existing display
44
+ #
45
+ # @param [Integer] display_id the display id
46
+ # @param opts [Hash] options hash of parameters
47
+ # @option opts [Integer] id The id of display
48
+ # @option opts [String] name The name of the display
49
+ # @option opts [Hash] options Display options
50
+ # @option opts [Array] screenIds Screen ids used to display
51
+ # @option opts [Boolean] active Whether display is active
52
+ # @option opts [String] created Date display was created
53
+ # @option opts [Boolean] enabled Whether display is enabled
54
+ # @return [Hashie::Mash] Updated display
55
+ def update_display display_id, opts={}
56
+ put "commandcenter/displays/#{display_id}", opts
57
+ end
58
+
59
+ # Delete an existing display
60
+ #
61
+ # @param [Integer] display_id the display id
62
+ # @return [Hashie::Mash] Deleted display
63
+ def delete_display display_id
64
+ delete "commandcenter/displays/#{display_id}"
65
+ end
66
+
67
+ include BWAPI::Client::CommandCenter::Displays::Events
68
+ include BWAPI::Client::CommandCenter::Displays::Messages
69
+ include BWAPI::Client::CommandCenter::Displays::Scenes
70
+ include BWAPI::Client::CommandCenter::Displays::Screens
71
+ include BWAPI::Client::CommandCenter::Displays::Users
72
+
73
+ end
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,78 @@
1
+ module BWAPI
2
+ class Client
3
+ module CommandCenter
4
+ module Displays
5
+ # Displays module for commandcenter/displays/events endpoints
6
+ module Events
7
+
8
+ # Get the events for an existing display
9
+ #
10
+ # @param [Integer] display_id The display id
11
+ # @return [Hashie::Mash] All events for display
12
+ def events display_id
13
+ get "commandcenter/displays/#{display_id}/events"
14
+ end
15
+
16
+ # Get an existing display event
17
+ #
18
+ # @param [Integer] display_id The display id
19
+ # @param [Integer] event_id The event id
20
+ # @return [Hashie::Mash] Specific event for display
21
+ def get_event display_id, event_id
22
+ get "commandcenter/displays/#{display_id}/events/#{event_id}"
23
+ end
24
+
25
+ # Create a new display event
26
+ #
27
+ # @param [Integer] display_id The display id
28
+ # @param opts [Hash] options hash of parameters
29
+ # @option opts [Integer] id The event id
30
+ # @option opts [String] name The event name
31
+ # @option opts [String] description The event description
32
+ # @option opts [Integer] displayId The display id
33
+ # @option opts [Boolean] matched Events rules matched
34
+ # @option opts [Integer] queryId Reference query id
35
+ # @option opts [Integer] threshold Event mention volume threshold
36
+ # @option opts [Hash] action Event action
37
+ # @option opts [String] created Date event created
38
+ # @option opts [Boolean] enabled Whether event is enabled
39
+ # @option opts [Hash] filters Event filter options
40
+ # @return [Hashie::Mash] New display event
41
+ def create_event display_id, opts={}
42
+ post "commandcenter/displays/#{display_id}/events", opts
43
+ end
44
+
45
+ # Update an existing display event
46
+ #
47
+ # @param [Integer] display_id The display id
48
+ # @param opts [Hash] options hash of parameters
49
+ # @option opts [Integer] id The event id
50
+ # @option opts [String] name The event name
51
+ # @option opts [String] description The event description
52
+ # @option opts [Integer] displayId The display id
53
+ # @option opts [Boolean] matched Events rules matched
54
+ # @option opts [Integer] queryId Reference query id
55
+ # @option opts [Integer] threshold Event mention volume threshold
56
+ # @option opts [Hash] action Event action
57
+ # @option opts [String] created Date event created
58
+ # @option opts [Boolean] enabled Whether event is enabled
59
+ # @option opts [Hash] filters Event filter options
60
+ # @return [Hashie::Mash] Updated display event
61
+ def update_event display_id, event_id, opts={}
62
+ put "commandcenter/displays/#{display_id}/events/#{event_id}", opts
63
+ end
64
+
65
+ # Delete an existing display event
66
+ #
67
+ # @param [Integer] display_id The display id
68
+ # @param [Integer] event_id The event id
69
+ # @return [Hashie::Mash] Deleted display event
70
+ def delete_event display_id, event_id
71
+ delete "commandcenter/displays/#{display_id}/events/#{event_id}"
72
+ end
73
+
74
+ end
75
+ end
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,74 @@
1
+ module BWAPI
2
+ class Client
3
+ module CommandCenter
4
+ module Displays
5
+ # Displays module for commandcenter/displays/messages endpoints
6
+ module Messages
7
+
8
+ # Get the messages for an existing display
9
+ #
10
+ # @param [Integer] display_id The display id
11
+ # @return [Hashie::Mash] All messages for display
12
+ def messages display_id
13
+ get "commandcenter/displays/#{display_id}/messages"
14
+ end
15
+
16
+ # Get an existing display message
17
+ #
18
+ # @param [Integer] display_id The display id
19
+ # @param [Integer] message_id The message id
20
+ # @return [Hashie::Mash] Specific message for display
21
+ def get_message display_id, message_id
22
+ get "commandcenter/displays/#{display_id}/messages/#{message_id}"
23
+ end
24
+
25
+ # Create a new display message
26
+ #
27
+ # @param [Integer] display_id The display id
28
+ # @param opts [Hash] options hash of parameters
29
+ # @option opts [Integer] id The id of message
30
+ # @option opts [Integer] displayId The display id
31
+ # @option opts [String] title The message title
32
+ # @option opts [String] type The message type
33
+ # @option opts [String] content The message content
34
+ # @option opts [Integer] duration The message duration
35
+ # @option opts [Boolean] active Whether message is active
36
+ # @option opts [Boolean] enabled Whether message is enabled
37
+ # @option opts [Array] screenIds ScreenIds where message is shown
38
+ # @return [Hashie::Mash] New display message
39
+ def create_message display_id, opts={}
40
+ post "commandcenter/displays/#{display_id}/message", opts
41
+ end
42
+
43
+ # Update an existing display message
44
+ #
45
+ # @param [Integer] display_id The display id
46
+ # @param opts [Hash] options hash of parameters
47
+ # @option opts [Integer] id The id of message
48
+ # @option opts [Integer] displayId The display id
49
+ # @option opts [String] title The message title
50
+ # @option opts [String] type The message type
51
+ # @option opts [String] content The message content
52
+ # @option opts [Integer] duration The message duration
53
+ # @option opts [Boolean] active Whether message is active
54
+ # @option opts [Boolean] enabled Whether message is enabled
55
+ # @option opts [Array] screenIds ScreenIds where message is shown
56
+ # @return [Hashie::Mash] Updated display message
57
+ def update_message display_id, message_id, opts={}
58
+ put "commandcenter/displays/#{display_id}/messages/#{message_id}", opts
59
+ end
60
+
61
+ # Delete an existing display message
62
+ #
63
+ # @param [Integer] display_id The display id
64
+ # @param [Integer] message_id The message id
65
+ # @return [Hashie::Mash] Deleted display message
66
+ def delete_message display_id, message_id
67
+ delete "commandcenter/displays/#{display_id}/messages/#{message_id}"
68
+ end
69
+
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,85 @@
1
+ module BWAPI
2
+ class Client
3
+ module CommandCenter
4
+ module Displays
5
+ # Displays module for commandcenter/displays/scenes endpoints
6
+ module Scenes
7
+
8
+ # Get the scenes for an existing display
9
+ #
10
+ # @param [Integer] display_id The display id
11
+ # @return [Hashie::Mash] All scenes for display
12
+ def scenes display_id
13
+ get "commandcenter/displays/#{display_id}/scenes"
14
+ end
15
+
16
+ # Get an existing display scene
17
+ #
18
+ # @param [Integer] display_id The display id
19
+ # @param [Integer] scene_id The scene id
20
+ # @return [Hashie::Mash] Specific scene for display
21
+ def get_scene display_id, scene_id
22
+ get "commandcenter/displays/#{display_id}/scenes/#{scene_id}"
23
+ end
24
+
25
+ # Get an existing display scene sub scenes
26
+ #
27
+ # @param [Integer] display_id The display id
28
+ # @param [Integer] scene_id The scene id
29
+ # @return [Hashie::Mash] Specific sub scenes for display scene
30
+ def get_scene_with_sub_scenes display_id, scene_id
31
+ get "commandcenter/displays/#{display_id}/scenes/#{scene_id}/subscenes"
32
+ end
33
+
34
+ # Create a new display scene
35
+ #
36
+ # @param [Integer] display_id The display id
37
+ # @param opts [Hash] options hash of parameters
38
+ # @option opts [Integer] id The id of scene
39
+ # @option opts String] name The name of the scene
40
+ # @option opts [Integer] projectId The project id
41
+ # @option opts [Integer] displayId The display id
42
+ # @option opts [Hash] options Scene options
43
+ # @option opts [Integer] sceneTypeId Scene type id
44
+ # @option opts [Array] subSceneIds Sub Scene ids
45
+ # @option opts [String] created Date scene was created
46
+ # @option opts [Boolean] enabled Whether scene is enabled
47
+ # @option opts [Hash] filter Filter options
48
+ # @return [Hashie::Mash] New display scene
49
+ def create_scene display_id, opts={}
50
+ post "commandcenter/displays/#{display_id}/scenes", opts
51
+ end
52
+
53
+ # Update an existing display scene
54
+ #
55
+ # @param [Integer] display_id The display id
56
+ # @param opts [Hash] options hash of parameters
57
+ # @option opts [Integer] id The id of scene
58
+ # @option opts String] name The name of the scene
59
+ # @option opts [Hash] options Scene options
60
+ # @option opts [Integer] projectId The project id
61
+ # @option opts [Integer] displayId The display id
62
+ # @option opts [Integer] sceneTypeId Scene type id
63
+ # @option opts [Array] subSceneIds Sub Scene ids
64
+ # @option opts [String] created Date scene was created
65
+ # @option opts [Boolean] enabled Whether scene is enabled
66
+ # @option opts [Hash] filter Filter options
67
+ # @return [Hashie::Mash] Updated display scene
68
+ def update_scene display_id, scene_id, opts={}
69
+ put "commandcenter/displays/#{display_id}/scenes/#{scene_id}", opts
70
+ end
71
+
72
+ # Delete an existing display scene
73
+ #
74
+ # @param [Integer] display_id The display id
75
+ # @param [Integer] scene_id The scene id
76
+ # @return [Hashie::Mash] Deleted display scene
77
+ def delete_scene display_id, scene_id
78
+ delete "commandcenter/displays/#{display_id}/scenes/#{scene_id}"
79
+ end
80
+
81
+ end
82
+ end
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,79 @@
1
+ module BWAPI
2
+ class Client
3
+ module CommandCenter
4
+ module Displays
5
+ # Displays module for commandcenter/displays/screens endpoints
6
+ module Screens
7
+
8
+ # Get the screens for a display
9
+ #
10
+ # @param [Integer] display_id The display id
11
+ # @return [Hashie::Mash] All screens for display
12
+ def screens display_id
13
+ get "commandcenter/displays/#{display_id}/screens"
14
+ end
15
+
16
+ # Get an existing display screen
17
+ #
18
+ # @param [Integer] display_id The display id
19
+ # @param [Integer] screen_id The screen id
20
+ # @return [Hashie::Mash] Specific screen for display
21
+ def get_screen display_id, screen_id
22
+ get "commandcenter/displays/#{display_id}/screens/#{screen_id}"
23
+ end
24
+
25
+ # Get an existing display screen with scenes
26
+ #
27
+ # @param [Integer] display_id The display id
28
+ # @param [Integer] screen_id The screen id
29
+ # @return [Hashie::Mash] Specific screen for display with scenes
30
+ def get_screen_with_scenes display_id, screen_id
31
+ get "commandcenter/displays/#{display_id}/screens/#{screen_id}/withscenes"
32
+ end
33
+
34
+ # Create a new display screen
35
+ #
36
+ # @param [Integer] display_id The display id
37
+ # @param opts [Hash] options hash of parameters
38
+ # @option opts [Integer] id The id of screen
39
+ # @option opts [String] name The name of the screen
40
+ # @option opts [Integer] displayId The display id
41
+ # @option opts [Hash] options Display options
42
+ # @option opts [Array] screenIds Screen ids used to display
43
+ # @option opts [String] created Date screen was created
44
+ # @option opts [Boolean] enabled Whether screen is enabled
45
+ # @return [Hashie::Mash] New display screen
46
+ def create_screen display_id, opts={}
47
+ post "commandcenter/displays/#{display_id}/screens", opts
48
+ end
49
+
50
+ # Update an existing display screen
51
+ #
52
+ # @param [Integer] display_id The display id
53
+ # @param opts [Hash] options hash of parameters
54
+ # @option opts [Integer] id The id of screen
55
+ # @option opts [String] name The name of the screen
56
+ # @option opts [Integer] displayId The display id
57
+ # @option opts [Hash] options Display options
58
+ # @option opts [Array] screenIds Screen ids used to display
59
+ # @option opts [String] created Date screen was created
60
+ # @option opts [Boolean] enabled Whether screen is enabled
61
+ # @return [Hashie::Mash] Updated display screen
62
+ def update_screen display_id, screen_id, opts={}
63
+ put "commandcenter/displays/#{display_id}/screens/#{screen_id}", opts
64
+ end
65
+
66
+ # Delete an existing display screen
67
+ #
68
+ # @param [Integer] display_id The display id
69
+ # @param [Integer] screen_id The screen id
70
+ # @return [Hashie::Mash] Deleted display screen
71
+ def delete_screen display_id, screen_id
72
+ delete "commandcenter/displays/#{display_id}/screens/#{screen_id}"
73
+ end
74
+
75
+ end
76
+ end
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,58 @@
1
+ require 'bwapi/client/command_center/displays/users/access'
2
+
3
+ module BWAPI
4
+ class Client
5
+ module CommandCenter
6
+ module Displays
7
+ # Users module for commandcenter/displays/users endpoints
8
+ module Users
9
+
10
+ # Get all users display access levels
11
+ #
12
+ # @return [Hashie::Mash] Display access levels
13
+ def displays_access_levels
14
+ get "commandcenter/displays/users"
15
+ end
16
+
17
+ # Get a users display access levels for displays
18
+ #
19
+ # @param [Integer] display_id the display id
20
+ # @param [Integer] user_id the user id
21
+ # @return [Hashie::Mash] Specific display user access levels
22
+ def get_displays_user_access_levels display_id, user_id
23
+ get "commandcenter/displays/users/#{user_id}"
24
+ end
25
+
26
+ # Get displays access levels for users
27
+ #
28
+ # @param [Integer] display_id the display id
29
+ # @return [Hashie::Mash] Specific display user access levels
30
+ def get_display_users_access_levels display_id
31
+ get "commandcenter/displays/#{display_id}/users"
32
+ end
33
+
34
+ # Get display access levels for existing user
35
+ #
36
+ # @param [Integer] display_id the display id
37
+ # @param [Integer] user_id the user id
38
+ # @return [Hashie::Mash] Specific display and user access level
39
+ def get_display_user_access_levels display_id, user_id
40
+ get "commandcenter/displays/#{display_id}/users/#{user_id}"
41
+ end
42
+
43
+ # Revoke display access levels for existing user
44
+ #
45
+ # @param [Integer] display_id the display id
46
+ # @param [Integer] user_id the user id
47
+ # @return [Hashie::Mash] Specific display and user access level
48
+ def delete_display_user_access_levels display_id, user_id
49
+ delete "commandcenter/displays/#{display_id}/users/#{user_id}"
50
+ end
51
+
52
+ include BWAPI::Client::CommandCenter::Displays::Users::Access
53
+
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,34 @@
1
+ module BWAPI
2
+ class Client
3
+ module CommandCenter
4
+ module Displays
5
+ module Users
6
+ # Displays module for commandcenter/displays/users/access endpoints
7
+ module Access
8
+
9
+ # Grant a display user access level
10
+ #
11
+ # @param [Integer] display_id the display id
12
+ # @param [Integer] user_id the user id
13
+ # @param [Integer] access_level the access level
14
+ # @return [Hashie::Mash] Updated user access level
15
+ def grant_display_user_access_level display_id, user_id, access_level
16
+ post "commandcenter/displays/#{display_id}/users/#{user_id}/access/#{access_level}"
17
+ end
18
+
19
+ # Update an existing display user access level
20
+ #
21
+ # @param [Integer] display_id the display id
22
+ # @param [Integer] user_id the user id
23
+ # @param [Integer] access_level the access level
24
+ # @return [Hashie::Mash] Updated user access level
25
+ def update_display_user_access_level display_id, user_id, access_level
26
+ put "commandcenter/displays/#{display_id}/users/#{user_id}/access/#{access_level}"
27
+ end
28
+
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,33 @@
1
+ module BWAPI
2
+ class Client
3
+ module CommandCenter
4
+ # Displays module for commandcenter/scenetypes endpoints
5
+ module SceneTypes
6
+
7
+ # Get the scene types visible to the user
8
+ #
9
+ # @return [Hashie::Mash] All scene types
10
+ def scene_types
11
+ get "commandcenter/scenetypes"
12
+ end
13
+
14
+ # Get an existing scene type
15
+ #
16
+ # @param [Integer] scene_type_id the scene type id
17
+ # @return [Hashie::Mash] Specific scene type
18
+ def get_scene_type scene_type_id
19
+ get "commandcenter/scenetypes/#{scene_type_id}"
20
+ end
21
+
22
+ # Get an existing scene type
23
+ #
24
+ # @param [Integer] scene_type_id the scene type id
25
+ # @return [Hashie::Mash] Specific scene type with sub scences
26
+ def get_scene_type_with_sub_scenes scene_type_id
27
+ get "commandcenter/scenetypes/#{scene_type_id}"
28
+ end
29
+
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,17 @@
1
+ module BWAPI
2
+ class Client
3
+ module CommandCenter
4
+ # Themes module for commandcenter/themes endpoints
5
+ module Themes
6
+
7
+ # Get themes for client
8
+ #
9
+ # @return [Hashie::Mash] All themes
10
+ def themes
11
+ get "commandcenter/themes"
12
+ end
13
+
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,37 @@
1
+ require 'bwapi/client/command_center/users/access'
2
+
3
+ module BWAPI
4
+ class Client
5
+ module CommandCenter
6
+ # Users module for commandcenter/users endpoints
7
+ module Users
8
+
9
+ # Get the access levels for all users
10
+ #
11
+ # @return [Hashie::Mash] All users access levels
12
+ def users_access_levels
13
+ get "commandcenter/users"
14
+ end
15
+
16
+ # Get an existing user access level
17
+ #
18
+ # @param [Integer] user_id the user id
19
+ # @return [Hashie::Mash] Specific user access level
20
+ def get_user_access_level user_id
21
+ get "commandcenter/users/#{user_id}"
22
+ end
23
+
24
+ # Delete an existing user access level
25
+ #
26
+ # @param [Integer] user_id the user id
27
+ # @return [Hashie::Mash] Deleted user access level
28
+ def delete_user_access_level user_id
29
+ delete "commandcenter/users/#{user_id}"
30
+ end
31
+
32
+ include BWAPI::Client::CommandCenter::Users::Access
33
+
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,21 @@
1
+ module BWAPI
2
+ class Client
3
+ module CommandCenter
4
+ # Users module for commandcenter/users/access endpoints
5
+ module Users
6
+ module Access
7
+
8
+ # Update an existing user access level
9
+ #
10
+ # @param [Integer] user_id the user id
11
+ # @param [Integer] access_level the access level
12
+ # @return [Hashie::Mash] Updated user access level
13
+ def update_user_access_level user_id, access_level
14
+ put "commandcenter/users/#{user_id}/access/#{access_level}"
15
+ end
16
+
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -1,3 +1,3 @@
1
1
  module BWAPI
2
- VERSION = "6.2.0"
2
+ VERSION = "6.3.0"
3
3
  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: 6.2.0.pre.205
4
+ version: 6.3.0.pre.222
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-02-14 00:00:00.000000000 Z
11
+ date: 2014-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -135,6 +135,19 @@ files:
135
135
  - lib/bwapi/client/brandwatch/become.rb
136
136
  - lib/bwapi/client/brandwatch/client_modules.rb
137
137
  - lib/bwapi/client/client.rb
138
+ - lib/bwapi/client/command_center.rb
139
+ - lib/bwapi/client/command_center/client.rb
140
+ - lib/bwapi/client/command_center/displays.rb
141
+ - lib/bwapi/client/command_center/displays/events.rb
142
+ - lib/bwapi/client/command_center/displays/messages.rb
143
+ - lib/bwapi/client/command_center/displays/scenes.rb
144
+ - lib/bwapi/client/command_center/displays/screens.rb
145
+ - lib/bwapi/client/command_center/displays/users.rb
146
+ - lib/bwapi/client/command_center/displays/users/access.rb
147
+ - lib/bwapi/client/command_center/scene_types.rb
148
+ - lib/bwapi/client/command_center/themes.rb
149
+ - lib/bwapi/client/command_center/users.rb
150
+ - lib/bwapi/client/command_center/users/access.rb
138
151
  - lib/bwapi/client/error_codes.rb
139
152
  - lib/bwapi/client/filters.rb
140
153
  - lib/bwapi/client/languages.rb