bwapi 6.5.0.pre.256 → 7.0.0.pre.271
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.editorconfig +11 -0
- data/.rubocop.yml +17 -0
- data/.travis.yml +7 -3
- data/bin/bwapi +2 -1
- data/bwapi.gemspec +13 -10
- data/lib/bwapi.rb +6 -6
- data/lib/bwapi/authentication.rb +9 -17
- data/lib/bwapi/client.rb +5 -4
- data/lib/bwapi/client/admin.rb +6 -6
- data/lib/bwapi/client/admin/become.rb +4 -4
- data/lib/bwapi/client/admin/search.rb +9 -12
- data/lib/bwapi/client/admin/sub_clients.rb +8 -13
- data/lib/bwapi/client/admin/users.rb +7 -7
- data/lib/bwapi/client/admin/users/sharing.rb +5 -7
- data/lib/bwapi/client/brandwatch.rb +4 -4
- data/lib/bwapi/client/brandwatch/become.rb +4 -4
- data/lib/bwapi/client/brandwatch/client_modules.rb +5 -6
- data/lib/bwapi/client/client.rb +5 -6
- data/lib/bwapi/client/command_center.rb +3 -3
- data/lib/bwapi/client/command_center/client.rb +4 -4
- data/lib/bwapi/client/command_center/displays.rb +9 -9
- data/lib/bwapi/client/command_center/displays/events.rb +8 -8
- data/lib/bwapi/client/command_center/displays/messages.rb +7 -8
- data/lib/bwapi/client/command_center/displays/scenes.rb +9 -9
- data/lib/bwapi/client/command_center/displays/screens.rb +9 -9
- data/lib/bwapi/client/command_center/displays/users.rb +7 -8
- data/lib/bwapi/client/command_center/displays/users/access.rb +4 -5
- data/lib/bwapi/client/command_center/scene_types.rb +6 -6
- data/lib/bwapi/client/command_center/themes.rb +4 -4
- data/lib/bwapi/client/command_center/users.rb +6 -6
- data/lib/bwapi/client/command_center/users/access.rb +5 -5
- data/lib/bwapi/client/error_codes.rb +4 -4
- data/lib/bwapi/client/filters.rb +4 -4
- data/lib/bwapi/client/languages.rb +3 -3
- data/lib/bwapi/client/location.rb +5 -5
- data/lib/bwapi/client/logout.rb +12 -14
- data/lib/bwapi/client/me.rb +3 -3
- data/lib/bwapi/client/metrics.rb +3 -3
- data/lib/bwapi/client/oauth.rb +8 -8
- data/lib/bwapi/client/ping.rb +8 -8
- data/lib/bwapi/client/projects.rb +10 -10
- data/lib/bwapi/client/projects/bulkactions.rb +4 -4
- data/lib/bwapi/client/projects/bulkactions/author.rb +4 -3
- data/lib/bwapi/client/projects/bulkactions/mentions.rb +4 -3
- data/lib/bwapi/client/projects/categories.rb +6 -20
- data/lib/bwapi/client/projects/data.rb +4 -5
- data/lib/bwapi/client/projects/data/mentions.rb +7 -7
- data/lib/bwapi/client/projects/data/volume.rb +11 -11
- data/lib/bwapi/client/projects/data_download.rb +6 -7
- data/lib/bwapi/client/projects/demographics.rb +3 -4
- data/lib/bwapi/client/projects/facebook_queries.rb +8 -9
- data/lib/bwapi/client/projects/group.rb +2 -2
- data/lib/bwapi/client/projects/group/author_group.rb +8 -7
- data/lib/bwapi/client/projects/group/location_group.rb +7 -7
- data/lib/bwapi/client/projects/group/site_group.rb +7 -7
- data/lib/bwapi/client/projects/queries.rb +9 -10
- data/lib/bwapi/client/projects/queries/backfill.rb +6 -8
- data/lib/bwapi/client/projects/queries/date_range.rb +9 -9
- data/lib/bwapi/client/projects/queries/mentions.rb +5 -8
- data/lib/bwapi/client/projects/query_groups.rb +7 -9
- data/lib/bwapi/client/projects/rules.rb +7 -9
- data/lib/bwapi/client/projects/rules/backfill.rb +4 -4
- data/lib/bwapi/client/projects/rules/copy.rb +4 -4
- data/lib/bwapi/client/projects/sharing.rb +8 -9
- data/lib/bwapi/client/projects/signals.rb +5 -5
- data/lib/bwapi/client/projects/stream_dashboards.rb +10 -10
- data/lib/bwapi/client/projects/stream_dashboards/streams.rb +6 -7
- data/lib/bwapi/client/projects/summary.rb +5 -6
- data/lib/bwapi/client/projects/tags.rb +8 -9
- data/lib/bwapi/client/projects/twitter_queries.rb +7 -8
- data/lib/bwapi/client/projects/users.rb +4 -4
- data/lib/bwapi/client/projects/workflow.rb +4 -4
- data/lib/bwapi/client/query_validation.rb +7 -7
- data/lib/bwapi/client/sso.rb +4 -4
- data/lib/bwapi/client/test_search.rb +9 -8
- data/lib/bwapi/client/user.rb +6 -6
- data/lib/bwapi/client/user/notifications.rb +8 -8
- data/lib/bwapi/configuration.rb +6 -6
- data/lib/bwapi/connection.rb +10 -19
- data/lib/bwapi/error.rb +43 -36
- data/lib/bwapi/request.rb +24 -27
- data/lib/bwapi/version.rb +5 -2
- data/lib/faraday/response/brandwatch_error.rb +21 -22
- data/spec/bwapi/authentication_spec.rb +7 -7
- data/spec/bwapi/client_spec.rb +17 -17
- data/spec/bwapi_spec.rb +3 -3
- data/spec/fixtures/.netrc +1 -1
- data/spec/helper.rb +4 -2
- metadata +61 -4
- data/lib/faraday/utils/utils.rb +0 -26
@@ -1,16 +1,17 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
module BWAPI
|
2
4
|
class Client
|
3
5
|
module Projects
|
4
6
|
module Queries
|
5
7
|
# DateRange module for projects/queries/dateRange endpoints
|
6
8
|
module DateRange
|
7
|
-
|
8
9
|
# Get all date ranges for query
|
9
10
|
#
|
10
11
|
# @param project_id [Integer] Id of project
|
11
12
|
# @param query_id [Integer] Id of query
|
12
13
|
# @return [Hashie::Mash] All date ranges for query
|
13
|
-
def date_ranges
|
14
|
+
def date_ranges(project_id, query_id)
|
14
15
|
get "projects/#{project_id}/queries/#{query_id}/date-range"
|
15
16
|
end
|
16
17
|
|
@@ -20,7 +21,7 @@ module BWAPI
|
|
20
21
|
# @param query_id [Integer] Id of query
|
21
22
|
# @param date_range_id [Integer] Id of date range
|
22
23
|
# @return [Hashie::Mash] Specific date range for query
|
23
|
-
def get_date_range
|
24
|
+
def get_date_range(project_id, query_id, date_range_id)
|
24
25
|
get "projects/#{project_id}/queries/#{query_id}/date-range/#{date_range_id}"
|
25
26
|
end
|
26
27
|
|
@@ -33,7 +34,7 @@ module BWAPI
|
|
33
34
|
# @option opts [Integer] queryId Id of the query
|
34
35
|
# @option opts [Array] StoredDateRangeDTO Date ranges to be stored
|
35
36
|
# @return [Hashie::Mash] New date range
|
36
|
-
def create_date_range
|
37
|
+
def create_date_range(project_id, query_id, opts = {})
|
37
38
|
post "projects/#{project_id}/queries/#{query_id}/date-range", opts
|
38
39
|
end
|
39
40
|
|
@@ -48,7 +49,7 @@ module BWAPI
|
|
48
49
|
# @option opts [Integer] dateRangeId Id of the date range
|
49
50
|
# @option opts [Array] StoredDateRangeDTO Date ranges to be edited
|
50
51
|
# @return [Hashie::Mash] Update date range
|
51
|
-
def update_date_range
|
52
|
+
def update_date_range(project_id, query_id, date_range_id, opts = {})
|
52
53
|
put "projects/#{project_id}/queries/#{query_id}/date-range/#{date_range_id}", opts
|
53
54
|
end
|
54
55
|
|
@@ -58,12 +59,11 @@ module BWAPI
|
|
58
59
|
# @param query_id [Integer] Id of query
|
59
60
|
# @param date_range_id [Integer] Id of date range
|
60
61
|
# @return [Hashie::Mash] Deleted date range
|
61
|
-
def delete_date_range
|
62
|
-
|
62
|
+
def delete_date_range(project_id, query_id, date_range_id)
|
63
|
+
delete "projects/#{project_id}/queries/#{query_id}/date-range/#{date_range_id}"
|
63
64
|
end
|
64
|
-
|
65
65
|
end
|
66
66
|
end
|
67
67
|
end
|
68
68
|
end
|
69
|
-
end
|
69
|
+
end
|
@@ -1,21 +1,19 @@
|
|
1
|
+
# encoding: utf-8
|
1
2
|
module BWAPI
|
2
3
|
class Client
|
3
4
|
module Projects
|
4
5
|
module Queries
|
5
6
|
# Mentions module for projects/queries/mentions endpoints
|
6
7
|
module Mentions
|
7
|
-
|
8
8
|
# Get the full text of query mention
|
9
9
|
#
|
10
10
|
# @param project_id [Integer] Id of project
|
11
11
|
# @param query_id [Integer] Id of query
|
12
12
|
# @param mention_id [Integer] Id of mention
|
13
13
|
# @return [Hashie::Mash] Content of query mention
|
14
|
-
def get_query_mention_content
|
14
|
+
def get_query_mention_content(project_id, query_id, mention_id)
|
15
15
|
get "projects/#{project_id}/queries/#{query_id}/mentions/#{mention_id}/content"
|
16
16
|
end
|
17
|
-
alias :query_mention_content :get_query_mention_content
|
18
|
-
alias :mention_content :get_query_mention_content
|
19
17
|
|
20
18
|
# Update query mention
|
21
19
|
#
|
@@ -28,7 +26,7 @@ module BWAPI
|
|
28
26
|
# @option opts [Integer] id Id of the mention
|
29
27
|
# @option opts [Hash] MentionPatchDTO patch to be applied
|
30
28
|
# @return [Hashie::Mash] Updated query mention
|
31
|
-
def update_query_mention
|
29
|
+
def update_query_mention(project_id, query_id, mention_id, opts = {})
|
32
30
|
patch "projects/#{project_id}/queries/#{query_id}/mentions/#{mention_id}", opts
|
33
31
|
end
|
34
32
|
|
@@ -43,12 +41,11 @@ module BWAPI
|
|
43
41
|
# @option opts [Integer] id Id of the mention
|
44
42
|
# @option opts [Hash] Map patch to be applied
|
45
43
|
# @return [Hashie::Mash] Deleted query mention
|
46
|
-
def delete_query_mention
|
44
|
+
def delete_query_mention(project_id, query_id, mention_id, opts = {})
|
47
45
|
delete "projects/#{project_id}/queries/#{query_id}/mentions/#{mention_id}", opts
|
48
46
|
end
|
49
|
-
|
50
47
|
end
|
51
48
|
end
|
52
49
|
end
|
53
50
|
end
|
54
|
-
end
|
51
|
+
end
|
@@ -1,16 +1,16 @@
|
|
1
|
+
# encoding: utf-8
|
1
2
|
module BWAPI
|
2
3
|
class Client
|
3
4
|
module Projects
|
4
5
|
# QueryGroups module for projects/queryGroups endpoints
|
5
6
|
module QueryGroups
|
6
|
-
|
7
7
|
# Get all query groups in project
|
8
8
|
#
|
9
9
|
# @param project_id [Integer] Id of project
|
10
10
|
# @option opts [Integer] page Page of projects to retrieve
|
11
11
|
# @option opts [Integer] pageSize Results per page of results
|
12
12
|
# @return [Hashie::Mash] All query groups in project
|
13
|
-
def query_groups
|
13
|
+
def query_groups(project_id, opts = {})
|
14
14
|
get "projects/#{project_id}/querygroups", opts
|
15
15
|
end
|
16
16
|
|
@@ -19,10 +19,9 @@ module BWAPI
|
|
19
19
|
# @param project_id [Integer] Id of project
|
20
20
|
# @param query_group_id [Integer] Id of query group
|
21
21
|
# @return [Hashie::Mash] Specific query group
|
22
|
-
def get_query_group
|
22
|
+
def get_query_group(project_id, query_group_id)
|
23
23
|
get "projects/#{project_id}/querygroups/#{query_group_id}"
|
24
24
|
end
|
25
|
-
alias :query_group :get_query_group
|
26
25
|
|
27
26
|
# Create a new query group in project
|
28
27
|
#
|
@@ -35,7 +34,7 @@ module BWAPI
|
|
35
34
|
# @option opts [Array] queries Queries within the query group
|
36
35
|
# @option opts [Hash] sharedProjectIds Projects which this query group belongs to
|
37
36
|
# @return [Hashie::Mash] New query group
|
38
|
-
def create_query_group
|
37
|
+
def create_query_group(project_id, opts = {})
|
39
38
|
post "projects/#{project_id}/querygroups", opts
|
40
39
|
end
|
41
40
|
|
@@ -51,7 +50,7 @@ module BWAPI
|
|
51
50
|
# @option opts [Array] queries Queries within the query group
|
52
51
|
# @option opts [Hash] sharedProjectIds Projects which this query group belongs to
|
53
52
|
# @return [Hashie::Mash] New query group
|
54
|
-
def update_query_group
|
53
|
+
def update_query_group(project_id, query_group_id, opts = {})
|
55
54
|
put "projects/#{project_id}/querygroups/#{query_group_id}", opts
|
56
55
|
end
|
57
56
|
|
@@ -60,11 +59,10 @@ module BWAPI
|
|
60
59
|
# @param project_id [Integer] Id of project
|
61
60
|
# @param query_group_id [Integer] Id of query group
|
62
61
|
# @return [Hashie::Mash] Deleted query group
|
63
|
-
def delete_query_group
|
62
|
+
def delete_query_group(project_id, query_group_id)
|
64
63
|
delete "projects/#{project_id}/querygroups/#{query_group_id}"
|
65
64
|
end
|
66
|
-
|
67
65
|
end
|
68
66
|
end
|
69
67
|
end
|
70
|
-
end
|
68
|
+
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# encoding: utf-8
|
1
2
|
require 'bwapi/client/projects/rules/backfill'
|
2
3
|
require 'bwapi/client/projects/rules/copy'
|
3
4
|
|
@@ -6,7 +7,6 @@ module BWAPI
|
|
6
7
|
module Projects
|
7
8
|
# Rules module for projects/rules endpoints
|
8
9
|
module Rules
|
9
|
-
|
10
10
|
# Get all rules in project
|
11
11
|
#
|
12
12
|
# @param project_id [Integer] The id of project
|
@@ -16,7 +16,7 @@ module BWAPI
|
|
16
16
|
# @option opts [Integer] page Page Number of results to retrieve
|
17
17
|
# @option opts [Integer] pageSize Results per page of results
|
18
18
|
# @return [Hashie::Mash] All rules in project
|
19
|
-
def rules
|
19
|
+
def rules(project_id, opts = {})
|
20
20
|
get "projects/#{project_id}/rules", opts
|
21
21
|
end
|
22
22
|
|
@@ -25,10 +25,9 @@ module BWAPI
|
|
25
25
|
# @param project_id [Integer] id The id of project
|
26
26
|
# @param rule_id [Integer] id The id of rule
|
27
27
|
# @return [Hashie::Mash] Specific rule
|
28
|
-
def get_rule
|
28
|
+
def get_rule(project_id, rule_id)
|
29
29
|
get "projects/#{project_id}/rules/#{rule_id}"
|
30
30
|
end
|
31
|
-
alias :rule :get_rule
|
32
31
|
|
33
32
|
# Create a new rule in project
|
34
33
|
#
|
@@ -43,7 +42,7 @@ module BWAPI
|
|
43
42
|
# @option opts [String] queryName The query name the rule is applied to
|
44
43
|
# @option opts [String] projectName The project name the rule is applied to
|
45
44
|
# @return [Hashie::Mash] New rule
|
46
|
-
def create_rule
|
45
|
+
def create_rule(project_id, opts = {})
|
47
46
|
post "projects/#{project_id}/rules", opts
|
48
47
|
end
|
49
48
|
|
@@ -60,7 +59,7 @@ module BWAPI
|
|
60
59
|
# @option opts [String] queryName The query name the rule is applied to
|
61
60
|
# @option opts [String] projectName The project name the rule is applied to
|
62
61
|
# @return [Hashie::Mash] Updated rule
|
63
|
-
def update_rule
|
62
|
+
def update_rule(project_id, rule_id, opts = {})
|
64
63
|
put "projects/#{project_id}/rules/#{rule_id}", opts
|
65
64
|
end
|
66
65
|
|
@@ -69,14 +68,13 @@ module BWAPI
|
|
69
68
|
# @param project_id [Integer] Id The project id
|
70
69
|
# @param rule_id [Integer] Id The rule id
|
71
70
|
# @return [Hashie::Mash] Deleted rule
|
72
|
-
def delete_rule
|
71
|
+
def delete_rule(project_id, rule_id)
|
73
72
|
delete "projects/#{project_id}/rules/#{rule_id}"
|
74
73
|
end
|
75
74
|
|
76
75
|
include BWAPI::Client::Projects::Rules::Backfill
|
77
76
|
include BWAPI::Client::Projects::Rules::Copy
|
78
|
-
|
79
77
|
end
|
80
78
|
end
|
81
79
|
end
|
82
|
-
end
|
80
|
+
end
|
@@ -1,21 +1,21 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
module BWAPI
|
2
4
|
class Client
|
3
5
|
module Projects
|
4
6
|
module Rules
|
5
7
|
# Backfill module for projects/rules/backfill endpoint
|
6
8
|
module Backfill
|
7
|
-
|
8
9
|
# Create a backfill for a rule in project
|
9
10
|
#
|
10
11
|
# @param project_id [Integer] id The id of project
|
11
12
|
# @param rule_id [Integer] id The id of rule
|
12
13
|
# @return [Hashie::Mash] Specific rule backfill
|
13
|
-
def create_rule_backfill
|
14
|
+
def create_rule_backfill(project_id, rule_id)
|
14
15
|
post "projects/#{project_id}/rules/#{rule_id}/backfill"
|
15
16
|
end
|
16
|
-
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
21
|
-
end
|
21
|
+
end
|
@@ -1,10 +1,11 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
module BWAPI
|
2
4
|
class Client
|
3
5
|
module Projects
|
4
6
|
module Rules
|
5
7
|
# Backfill module for projects/rules/copy endpoint
|
6
8
|
module Copy
|
7
|
-
|
8
9
|
# Copy a rule to another project
|
9
10
|
#
|
10
11
|
# @param project_id [Integer] id The id of project
|
@@ -12,12 +13,11 @@ module BWAPI
|
|
12
13
|
# @param opts [Hash] options Hash of parameters
|
13
14
|
# @option opts [Integer] copyToProjectId the target project id
|
14
15
|
# @return [Hashie::Mash] New rule created in project
|
15
|
-
def create_rule_copy
|
16
|
+
def create_rule_copy(project_id, rule_id, opts = {})
|
16
17
|
post "projects/#{project_id}/rules/#{rule_id}/copy", opts
|
17
18
|
end
|
18
|
-
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
23
|
-
end
|
23
|
+
end
|
@@ -1,16 +1,16 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
module BWAPI
|
2
4
|
class Client
|
3
5
|
module Projects
|
4
6
|
# Sharing module for projects/sharing endpoints
|
5
7
|
module Sharing
|
6
|
-
|
7
8
|
# Default shares of a project
|
8
9
|
#
|
9
10
|
# @return [Hashie::Mash] Default project shares information
|
10
11
|
def default_project_sharing
|
11
|
-
get
|
12
|
+
get 'projects/sharing'
|
12
13
|
end
|
13
|
-
alias :sharing :default_project_sharing
|
14
14
|
|
15
15
|
# Shares of a project
|
16
16
|
#
|
@@ -18,7 +18,7 @@ module BWAPI
|
|
18
18
|
# @param opts [Hash] options hash of parameters
|
19
19
|
# @options opts [Boolean] sharedOnly Boolean flag to return only shared shares (default: false)
|
20
20
|
# @return [Hashie::Mash] Specific project shares
|
21
|
-
def project_sharing
|
21
|
+
def project_sharing(project_id, opts = {})
|
22
22
|
get "projects/#{project_id}/sharing", opts
|
23
23
|
end
|
24
24
|
|
@@ -28,7 +28,7 @@ module BWAPI
|
|
28
28
|
# @param opts [Hash] options hash of parameters
|
29
29
|
# @options opts [Array] ProjectShareDTO Shares to be edited
|
30
30
|
# @return [Hashie::Mash] Updated project shares
|
31
|
-
def update_project_sharing
|
31
|
+
def update_project_sharing(project_id, opts = {})
|
32
32
|
put "projects/#{project_id}/sharing", opts
|
33
33
|
end
|
34
34
|
|
@@ -37,7 +37,7 @@ module BWAPI
|
|
37
37
|
# @param project_id [Integer] Id of project
|
38
38
|
# @param user_id [Integer] Id of user
|
39
39
|
# @return [Hashie::Mash] Share of project for user
|
40
|
-
def project_sharing_user
|
40
|
+
def project_sharing_user(project_id, user_id)
|
41
41
|
get "projects/#{project_id}/sharing/#{user_id}"
|
42
42
|
end
|
43
43
|
|
@@ -47,11 +47,10 @@ module BWAPI
|
|
47
47
|
# @param user_id [Integer] Id of user
|
48
48
|
# @options opts [Hash] User share to be edited
|
49
49
|
# @return [Hashie::Mash] Updated share of project for user
|
50
|
-
def update_project_sharing_user
|
50
|
+
def update_project_sharing_user(project_id, user_id, opts = {})
|
51
51
|
put "projects/#{project_id}/sharing/#{user_id}", opts
|
52
52
|
end
|
53
|
-
|
54
53
|
end
|
55
54
|
end
|
56
55
|
end
|
57
|
-
end
|
56
|
+
end
|
@@ -1,9 +1,10 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
module BWAPI
|
2
4
|
class Client
|
3
5
|
module Projects
|
4
6
|
# Signals module for projects/signals endpoints
|
5
7
|
module Signals
|
6
|
-
|
7
8
|
# Get all signals belonging to user in project
|
8
9
|
#
|
9
10
|
# @param project_id [Integer] Id of project
|
@@ -15,7 +16,7 @@ module BWAPI
|
|
15
16
|
# @option opts [String] type Type of signal
|
16
17
|
# @option opts [Hash] filter The filter(s) to apply
|
17
18
|
# @return [Hashie::Mash] All signals for user in project
|
18
|
-
def signals
|
19
|
+
def signals(project_id, opts = {})
|
19
20
|
get "projects/#{project_id}/signals", opts
|
20
21
|
end
|
21
22
|
|
@@ -28,11 +29,10 @@ module BWAPI
|
|
28
29
|
# @option opts [String] comment User comment
|
29
30
|
# @option opts [Integer] signalId Id of signal
|
30
31
|
# @return [Hashie::Mash] Update signal for given user
|
31
|
-
def set_signal_vote
|
32
|
+
def set_signal_vote(project_id, opts = {})
|
32
33
|
post "projects/#{project_id}/signals/vote", opts
|
33
34
|
end
|
34
|
-
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
38
|
-
end
|
38
|
+
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
require 'bwapi/client/projects/stream_dashboards/streams'
|
2
4
|
|
3
5
|
module BWAPI
|
@@ -5,7 +7,6 @@ module BWAPI
|
|
5
7
|
module Projects
|
6
8
|
# StreamDashboards module for projects/stream_dashboards endpoints
|
7
9
|
module StreamDashboards
|
8
|
-
|
9
10
|
# Get all stream dashboards in project
|
10
11
|
#
|
11
12
|
# @param project_id [Integer] Id of project
|
@@ -13,7 +14,7 @@ module BWAPI
|
|
13
14
|
# @option opts [Integer] page Page of projects to retrieve
|
14
15
|
# @option opts [Integer] pageSize Results per page of results
|
15
16
|
# @return [Hashie::Mash] All stream dashboards for project
|
16
|
-
def stream_dashboards
|
17
|
+
def stream_dashboards(project_id, opts = {})
|
17
18
|
get "projects/#{project_id}/streamDashboards", opts
|
18
19
|
end
|
19
20
|
|
@@ -24,7 +25,7 @@ module BWAPI
|
|
24
25
|
# @option opts [Integer] page Page of projects to retrieve
|
25
26
|
# @option opts [Integer] pageSize Results per page of results
|
26
27
|
# @return [Hashie::Mash] All stream dashboards summary for project
|
27
|
-
def get_stream_dashboards_summary
|
28
|
+
def get_stream_dashboards_summary(project_id)
|
28
29
|
get "projects/#{project_id}/streamDashboards/summary"
|
29
30
|
end
|
30
31
|
|
@@ -33,7 +34,7 @@ module BWAPI
|
|
33
34
|
# @param project_id [Integer] Id of project
|
34
35
|
# @param stream_dashboard_id [Integer] Id of stream dashboard
|
35
36
|
# @return [Hashie::Mash] Stream dashboard complete with streams
|
36
|
-
def get_stream_dashboard_complete
|
37
|
+
def get_stream_dashboard_complete(project_id, stream_dashboard_id)
|
37
38
|
get "projects/#{project_id}/streamDashboards/#{stream_dashboard_id}/complete"
|
38
39
|
end
|
39
40
|
|
@@ -42,7 +43,7 @@ module BWAPI
|
|
42
43
|
# @param project_id [Integer] Id of project
|
43
44
|
# @param stream_dashboard_id [Integer] Id of stream dashboard
|
44
45
|
# @return [Hashie::Mash] Stream dashboard
|
45
|
-
def get_stream_dashboard
|
46
|
+
def get_stream_dashboard(project_id, stream_dashboard_id)
|
46
47
|
get "projects/#{project_id}/streamDashboards/#{stream_dashboard_id}"
|
47
48
|
end
|
48
49
|
|
@@ -55,7 +56,7 @@ module BWAPI
|
|
55
56
|
# @option opts [String] created The stream creation date
|
56
57
|
# @option opts [String] filter the stream filter
|
57
58
|
# @return [Hashie::Mash] New stream dashboard
|
58
|
-
def create_stream_dashboard
|
59
|
+
def create_stream_dashboard(project_id, opts = {})
|
59
60
|
post "projects/#{project_id}/streamDashboards", opts
|
60
61
|
end
|
61
62
|
|
@@ -69,7 +70,7 @@ module BWAPI
|
|
69
70
|
# @option opts [String] created The stream creation date
|
70
71
|
# @option opts [String] filter the stream filter
|
71
72
|
# @return [Hashie::Mash] Updated stream dashboard
|
72
|
-
def update_stream_dashboard
|
73
|
+
def update_stream_dashboard(project_id, stream_dashboard_id, opts = {})
|
73
74
|
put "projects/#{project_id}/streamDashboards/#{stream_dashboard_id}", opts
|
74
75
|
end
|
75
76
|
|
@@ -77,13 +78,12 @@ module BWAPI
|
|
77
78
|
#
|
78
79
|
# @param project_id [Integer] Id of project
|
79
80
|
# @param stream_dashboard_id [Integer] Id of stream dashboard
|
80
|
-
def delete_stream_dashboard
|
81
|
+
def delete_stream_dashboard(project_id, stream_dashboard_id)
|
81
82
|
delete "projects/#{project_id}/streamDashboards/#{stream_dashboard_id}"
|
82
83
|
end
|
83
84
|
|
84
85
|
include BWAPI::Client::Projects::StreamDashboards::Streams
|
85
|
-
|
86
86
|
end
|
87
87
|
end
|
88
88
|
end
|
89
|
-
end
|
89
|
+
end
|