bwapi 10.0.0.pre.549 → 10.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.editorconfig +1 -1
- data/.gitignore +1 -1
- data/lib/bwapi/client.rb +3 -26
- data/lib/bwapi/client/admin.rb +0 -2
- data/lib/bwapi/client/brandwatch.rb +0 -6
- data/lib/bwapi/client/brandwatch/become.rb +2 -0
- data/lib/bwapi/client/brandwatch/clients.rb +8 -2
- data/lib/bwapi/client/brandwatch/clients/users.rb +2 -0
- data/lib/bwapi/client/command_center.rb +0 -12
- data/lib/bwapi/client/command_center/displays/scenes.rb +1 -1
- data/lib/bwapi/client/command_center/scene_types.rb +3 -3
- data/lib/bwapi/client/oauth.rb +1 -2
- data/lib/bwapi/client/projects.rb +11 -13
- data/lib/bwapi/client/projects/{bulk_actions.rb → bulkactions.rb} +2 -2
- data/lib/bwapi/client/projects/{bulk_actions → bulkactions}/author.rb +0 -0
- data/lib/bwapi/client/projects/{bulk_actions → bulkactions}/mentions.rb +0 -0
- data/lib/bwapi/client/projects/data.rb +0 -20
- data/lib/bwapi/client/projects/data/mentions.rb +2 -32
- data/lib/bwapi/client/projects/signals/groups.rb +5 -18
- data/lib/bwapi/client/user.rb +0 -2
- data/lib/bwapi/configuration.rb +2 -3
- data/lib/bwapi/default.rb +3 -7
- data/lib/bwapi/error.rb +2 -0
- data/spec/bwapi/client_spec.rb +167 -29
- metadata +30 -72
- data/lib/bwapi/client/admin/demographics.rb +0 -17
- data/lib/bwapi/client/aggregates.rb +0 -13
- data/lib/bwapi/client/author.rb +0 -56
- data/lib/bwapi/client/brandwatch/clients/command_center.rb +0 -20
- data/lib/bwapi/client/brandwatch/clients/command_center/limits.rb +0 -33
- data/lib/bwapi/client/brandwatch/clients/command_center/scene_types.rb +0 -26
- data/lib/bwapi/client/brandwatch/clients/command_center/themes.rb +0 -26
- data/lib/bwapi/client/brandwatch/clients/command_center/users.rb +0 -30
- data/lib/bwapi/client/brandwatch/clients/command_center/users/access.rb +0 -28
- data/lib/bwapi/client/brandwatch/command_center.rb +0 -14
- data/lib/bwapi/client/brandwatch/command_center/scene_types.rb +0 -31
- data/lib/bwapi/client/brandwatch/command_center/themes.rb +0 -17
- data/lib/bwapi/client/brandwatch/log_level.rb +0 -17
- data/lib/bwapi/client/brandwatch/price_structures.rb +0 -45
- data/lib/bwapi/client/brandwatch/usage_report.rb +0 -19
- data/lib/bwapi/client/command_center/category_colours.rb +0 -15
- data/lib/bwapi/client/command_center/colour_palette.rb +0 -22
- data/lib/bwapi/client/command_center/display_access.rb +0 -12
- data/lib/bwapi/client/command_center/display_access/users.rb +0 -14
- data/lib/bwapi/client/command_center/display_access/users/access.rb +0 -21
- data/lib/bwapi/client/command_center/projects.rb +0 -16
- data/lib/bwapi/client/command_center/projects/category_colours.rb +0 -45
- data/lib/bwapi/client/command_center/projects/data.rb +0 -21
- data/lib/bwapi/client/command_center/projects/tag_colours.rb +0 -45
- data/lib/bwapi/client/command_center/query_colours.rb +0 -36
- data/lib/bwapi/client/command_center/tag_colours.rb +0 -15
- data/lib/bwapi/client/dimensions.rb +0 -13
- data/lib/bwapi/client/projects/data/audience.rb +0 -21
- data/lib/bwapi/client/projects/data/audience_activity.rb +0 -21
- data/lib/bwapi/client/projects/data/channel_metrics.rb +0 -21
- data/lib/bwapi/client/projects/data/emoticons.rb +0 -23
- data/lib/bwapi/client/projects/data/hashtags.rb +0 -23
- data/lib/bwapi/client/projects/data/headlines.rb +0 -20
- data/lib/bwapi/client/projects/data/impressions.rb +0 -21
- data/lib/bwapi/client/projects/data/mentioned_authors.rb +0 -23
- data/lib/bwapi/client/projects/data/owner_activity.rb +0 -21
- data/lib/bwapi/client/projects/data/urls.rb +0 -23
- data/lib/bwapi/client/projects/query/mentionfind.rb +0 -21
- data/lib/bwapi/client/user/instagram_credentials.rb +0 -32
- data/spec/bwapi/configuration_spec.rb +0 -499
- data/spec/bwapi/default_spec.rb +0 -242
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MmNlMDc2Nzc2NDExZGM1ODE4MzgxNTQ5MmMzZGEzYWQwNjViNmM5Nw==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6d9f016e4bc3be418b87ee218885361211367513
|
4
|
+
data.tar.gz: 85912ea24c6d2f4de96252032a1a03af8abb1940
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
ZjMwNjFhZDNlNzZiZTliYjM2Nzc3YzM3MjNiMjUzMDk4Y2IxZTE2NDZlZjZh
|
11
|
-
ODNlOTkzYzJmNjBkNGY3Yzg2MTExZTUwMjQ2ZDY1ZmFhM2Y0YmE=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
MWMzZmZjMmVhNGJjNWI4OTk2ZWUzN2ZiMGZlNGFmOGMxZmZkNzM4MTU2MjEx
|
14
|
-
ZDg3MWY3ZjQ4NTRmN2ZiNjJlOWM5ZDc2NmU2YjVjODIxMTY4MTA5ODM0MTk5
|
15
|
-
OWNjZTRjYzNhZDUwYzQ1MGRjZmY4ODdlMGU0YmJkNGY3MTI3YTg=
|
6
|
+
metadata.gz: 0b5b7ef979fe845621032300dc9cb279875be0eb77c275c20ab353ed86dc767f088082d2eb8752d44c6a76448f4af17eea8eb12873a6e84132d894a6564725ae
|
7
|
+
data.tar.gz: de0ca9c16a38db3acba187739fcc75d1c8d1b7a4a657eb333031a407db5bd914dbdc1924b3182df10189ec1d3a4eb967ab2e9f22f02502b0b066d787e7d5b583
|
data/.editorconfig
CHANGED
data/.gitignore
CHANGED
data/lib/bwapi/client.rb
CHANGED
@@ -4,12 +4,9 @@ require 'bwapi/request'
|
|
4
4
|
require 'bwapi/performance'
|
5
5
|
|
6
6
|
require 'bwapi/client/admin'
|
7
|
-
require 'bwapi/client/aggregates'
|
8
|
-
require 'bwapi/client/author'
|
9
7
|
require 'bwapi/client/brandwatch'
|
10
8
|
require 'bwapi/client/client'
|
11
9
|
require 'bwapi/client/command_center'
|
12
|
-
require 'bwapi/client/dimensions'
|
13
10
|
require 'bwapi/client/error_codes'
|
14
11
|
require 'bwapi/client/filters'
|
15
12
|
require 'bwapi/client/languages'
|
@@ -19,9 +16,9 @@ require 'bwapi/client/me'
|
|
19
16
|
require 'bwapi/client/metrics'
|
20
17
|
require 'bwapi/client/oauth'
|
21
18
|
require 'bwapi/client/ping'
|
19
|
+
require 'bwapi/client/sso'
|
22
20
|
require 'bwapi/client/projects'
|
23
21
|
require 'bwapi/client/query_validation'
|
24
|
-
require 'bwapi/client/sso'
|
25
22
|
require 'bwapi/client/test_search'
|
26
23
|
require 'bwapi/client/user'
|
27
24
|
require 'faraday'
|
@@ -35,12 +32,9 @@ module BWAPI
|
|
35
32
|
include BWAPI::Performance
|
36
33
|
|
37
34
|
include BWAPI::Client::Admin
|
38
|
-
include BWAPI::Client::Aggregates
|
39
|
-
include BWAPI::Client::Author
|
40
35
|
include BWAPI::Client::Brandwatch
|
41
36
|
include BWAPI::Client::Client
|
42
37
|
include BWAPI::Client::CommandCenter
|
43
|
-
include BWAPI::Client::Dimensions
|
44
38
|
include BWAPI::Client::ErrorCodes
|
45
39
|
include BWAPI::Client::Filters
|
46
40
|
include BWAPI::Client::Languages
|
@@ -51,8 +45,8 @@ module BWAPI
|
|
51
45
|
include BWAPI::Client::OAuth
|
52
46
|
include BWAPI::Client::Ping
|
53
47
|
include BWAPI::Client::Projects
|
54
|
-
include BWAPI::Client::QueryValidation
|
55
48
|
include BWAPI::Client::SSO
|
49
|
+
include BWAPI::Client::QueryValidation
|
56
50
|
include BWAPI::Client::TestSearch
|
57
51
|
include BWAPI::Client::User
|
58
52
|
|
@@ -65,19 +59,11 @@ module BWAPI
|
|
65
59
|
end
|
66
60
|
end
|
67
61
|
|
68
|
-
# Check is access token has expired
|
69
|
-
#
|
70
|
-
# @return [Boolean] access token expiry status
|
71
|
-
def access_token_expired?
|
72
|
-
return true if @access_token.nil? || @access_token_expiry.nil?
|
73
|
-
seconds_until_access_token_expires <= 0
|
74
|
-
end
|
75
|
-
|
76
62
|
# Check if user is authenicated
|
77
63
|
#
|
78
64
|
# @return [Boolean] Authenticated status
|
79
65
|
def authenticated?
|
80
|
-
|
66
|
+
@access_token ? true : false
|
81
67
|
end
|
82
68
|
|
83
69
|
# Check if user is a brandwatch-application-client type
|
@@ -123,14 +109,5 @@ module BWAPI
|
|
123
109
|
reset_connection
|
124
110
|
@verify_ssl = value
|
125
111
|
end
|
126
|
-
|
127
|
-
private
|
128
|
-
|
129
|
-
# Returns the number of seconds until the access token expires
|
130
|
-
#
|
131
|
-
# @return [Integer] seconds until expiry
|
132
|
-
def seconds_until_access_token_expires
|
133
|
-
DateTime.parse(@access_token_expiry).to_time.to_i - Time.now.to_i
|
134
|
-
end
|
135
112
|
end
|
136
113
|
end
|
data/lib/bwapi/client/admin.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'bwapi/client/admin/become'
|
2
|
-
require 'bwapi/client/admin/demographics'
|
3
2
|
require 'bwapi/client/admin/search'
|
4
3
|
require 'bwapi/client/admin/clients/sub_clients'
|
5
4
|
require 'bwapi/client/admin/clients/users'
|
@@ -28,7 +27,6 @@ module BWAPI
|
|
28
27
|
end
|
29
28
|
|
30
29
|
include BWAPI::Client::Admin::Become
|
31
|
-
include BWAPI::Client::Admin::Demographics
|
32
30
|
include BWAPI::Client::Admin::Search
|
33
31
|
include BWAPI::Client::Admin::Clients::SubClients
|
34
32
|
include BWAPI::Client::Admin::Clients::Users
|
@@ -1,8 +1,5 @@
|
|
1
1
|
require 'bwapi/client/brandwatch/become'
|
2
2
|
require 'bwapi/client/brandwatch/clients'
|
3
|
-
require 'bwapi/client/brandwatch/log_level'
|
4
|
-
require 'bwapi/client/brandwatch/price_structures'
|
5
|
-
require 'bwapi/client/brandwatch/usage_report'
|
6
3
|
|
7
4
|
module BWAPI
|
8
5
|
class Client
|
@@ -29,9 +26,6 @@ module BWAPI
|
|
29
26
|
|
30
27
|
include BWAPI::Client::Brandwatch::Become
|
31
28
|
include BWAPI::Client::Brandwatch::Clients
|
32
|
-
include BWAPI::Client::Brandwatch::LogLevel
|
33
|
-
include BWAPI::Client::Brandwatch::PriceStructures
|
34
|
-
include BWAPI::Client::Brandwatch::UsageReport
|
35
29
|
end
|
36
30
|
end
|
37
31
|
end
|
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'bwapi/client/brandwatch/clients/command_center'
|
2
1
|
require 'bwapi/client/brandwatch/clients/users'
|
3
2
|
require 'bwapi/client/brandwatch/clients/modules'
|
4
3
|
|
@@ -9,6 +8,8 @@ module BWAPI
|
|
9
8
|
module Clients
|
10
9
|
# Get specific clients
|
11
10
|
#
|
11
|
+
# @note must be a super admin user
|
12
|
+
#
|
12
13
|
# @param opts [Hash] options Hash of parameters
|
13
14
|
# @options opts [String] nameContains Client name search (case insensitive)
|
14
15
|
# @return [Hash] List of filtered clients
|
@@ -18,6 +19,8 @@ module BWAPI
|
|
18
19
|
|
19
20
|
# Create a new parent client
|
20
21
|
#
|
22
|
+
# @note must be a super admin user
|
23
|
+
#
|
21
24
|
# @param opts [Hash] options Hash of parameters
|
22
25
|
# @option opts [String] address1 Address line one of the client
|
23
26
|
# @option opts [String] address2 Address line two of the client
|
@@ -53,6 +56,8 @@ module BWAPI
|
|
53
56
|
|
54
57
|
# Get specific client
|
55
58
|
#
|
59
|
+
# @note must be a super admin user
|
60
|
+
#
|
56
61
|
# @param client_id [Integer] Id of the client
|
57
62
|
# @return [Hash] Specific client
|
58
63
|
def brandwatch_get_client(client_id)
|
@@ -61,6 +66,8 @@ module BWAPI
|
|
61
66
|
|
62
67
|
# Update an existing parent client
|
63
68
|
#
|
69
|
+
# @note must be a super admin user
|
70
|
+
#
|
64
71
|
# @param client_id [Integer] Id of the client
|
65
72
|
# @param opts [Hash] options Hash of parameters
|
66
73
|
# @option opts [String] address1 Address line one of the client
|
@@ -95,7 +102,6 @@ module BWAPI
|
|
95
102
|
put "brandwatch/clients/#{client_id}", opts
|
96
103
|
end
|
97
104
|
|
98
|
-
include BWAPI::Client::Brandwatch::Clients::CommandCenter
|
99
105
|
include BWAPI::Client::Brandwatch::Clients::Users
|
100
106
|
include BWAPI::Client::Brandwatch::Clients::Modules
|
101
107
|
end
|
@@ -1,12 +1,6 @@
|
|
1
|
-
require 'bwapi/client/command_center/category_colours'
|
2
1
|
require 'bwapi/client/command_center/client'
|
3
|
-
require 'bwapi/client/command_center/colour_palette'
|
4
|
-
require 'bwapi/client/command_center/display_access'
|
5
2
|
require 'bwapi/client/command_center/displays'
|
6
|
-
require 'bwapi/client/command_center/projects'
|
7
|
-
require 'bwapi/client/command_center/query_colours'
|
8
3
|
require 'bwapi/client/command_center/scene_types'
|
9
|
-
require 'bwapi/client/command_center/tag_colours'
|
10
4
|
require 'bwapi/client/command_center/themes'
|
11
5
|
require 'bwapi/client/command_center/users'
|
12
6
|
|
@@ -14,15 +8,9 @@ module BWAPI
|
|
14
8
|
class Client
|
15
9
|
# CommandCenter module for commandcenter endpoints
|
16
10
|
module CommandCenter
|
17
|
-
include BWAPI::Client::CommandCenter::CategoryColours
|
18
11
|
include BWAPI::Client::CommandCenter::Client
|
19
|
-
include BWAPI::Client::CommandCenter::ColourPalette
|
20
|
-
include BWAPI::Client::CommandCenter::DisplayAccess
|
21
12
|
include BWAPI::Client::CommandCenter::Displays
|
22
|
-
include BWAPI::Client::CommandCenter::Projects
|
23
|
-
include BWAPI::Client::CommandCenter::QueryColours
|
24
13
|
include BWAPI::Client::CommandCenter::SceneTypes
|
25
|
-
include BWAPI::Client::CommandCenter::TagColours
|
26
14
|
include BWAPI::Client::CommandCenter::Themes
|
27
15
|
include BWAPI::Client::CommandCenter::Users
|
28
16
|
end
|
@@ -35,7 +35,7 @@ module BWAPI
|
|
35
35
|
# @param [Integer] display_id The display id
|
36
36
|
# @param opts [Hash] options hash of parameters
|
37
37
|
# @option opts [Integer] id The id of scene
|
38
|
-
# @option opts
|
38
|
+
# @option opts String] name The name of the scene
|
39
39
|
# @option opts [Integer] projectId The project id
|
40
40
|
# @option opts [Integer] displayId The display id
|
41
41
|
# @option opts [Hash] options Scene options
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module BWAPI
|
2
2
|
class Client
|
3
3
|
module CommandCenter
|
4
|
-
#
|
4
|
+
# Displays module for commandcenter/scenetypes endpoints
|
5
5
|
module SceneTypes
|
6
6
|
# Get the scene types visible to the user
|
7
7
|
#
|
@@ -18,12 +18,12 @@ module BWAPI
|
|
18
18
|
get "commandcenter/scenetypes/#{scene_type_id}"
|
19
19
|
end
|
20
20
|
|
21
|
-
# Get an existing scene type
|
21
|
+
# Get an existing scene type
|
22
22
|
#
|
23
23
|
# @param [Integer] scene_type_id the scene type id
|
24
24
|
# @return [Hash] Specific scene type with sub scences
|
25
25
|
def get_scene_type_with_sub_scenes(scene_type_id)
|
26
|
-
get "commandcenter/scenetypes/#{scene_type_id}
|
26
|
+
get "commandcenter/scenetypes/#{scene_type_id}"
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
data/lib/bwapi/client/oauth.rb
CHANGED
@@ -61,8 +61,7 @@ module BWAPI
|
|
61
61
|
# @param opts [Hash] options hash of parameters
|
62
62
|
def oauth_request(opts = {})
|
63
63
|
response = post('oauth/token', opts)
|
64
|
-
self.access_token
|
65
|
-
self.access_token_expiry = Time.at(Time.now.to_i + response['expires_in']).iso8601
|
64
|
+
self.access_token = response['access_token']
|
66
65
|
self.refresh_token = response['refresh_token'] if application_client?
|
67
66
|
response
|
68
67
|
end
|
@@ -1,20 +1,19 @@
|
|
1
|
-
require 'bwapi/client/projects/
|
1
|
+
require 'bwapi/client/projects/bulkactions'
|
2
2
|
require 'bwapi/client/projects/categories'
|
3
3
|
require 'bwapi/client/projects/data'
|
4
4
|
require 'bwapi/client/projects/data_download'
|
5
5
|
require 'bwapi/client/projects/demographics'
|
6
6
|
require 'bwapi/client/projects/facebook_queries'
|
7
|
+
require 'bwapi/client/projects/twitter_queries'
|
7
8
|
require 'bwapi/client/projects/group'
|
9
|
+
require 'bwapi/client/projects/signals'
|
10
|
+
require 'bwapi/client/projects/summary'
|
11
|
+
require 'bwapi/client/projects/sharing'
|
12
|
+
require 'bwapi/client/projects/stream_dashboards'
|
8
13
|
require 'bwapi/client/projects/queries'
|
9
|
-
require 'bwapi/client/projects/query/mentionfind'
|
10
14
|
require 'bwapi/client/projects/query_groups'
|
11
15
|
require 'bwapi/client/projects/rules'
|
12
|
-
require 'bwapi/client/projects/sharing'
|
13
|
-
require 'bwapi/client/projects/signals'
|
14
|
-
require 'bwapi/client/projects/stream_dashboards'
|
15
|
-
require 'bwapi/client/projects/summary'
|
16
16
|
require 'bwapi/client/projects/tags'
|
17
|
-
require 'bwapi/client/projects/twitter_queries'
|
18
17
|
require 'bwapi/client/projects/users'
|
19
18
|
require 'bwapi/client/projects/workflow'
|
20
19
|
|
@@ -88,16 +87,15 @@ module BWAPI
|
|
88
87
|
include BWAPI::Client::Projects::Demographics
|
89
88
|
include BWAPI::Client::Projects::FacebookQueries
|
90
89
|
include BWAPI::Client::Projects::Group
|
90
|
+
include BWAPI::Client::Projects::TwitterQueries
|
91
|
+
include BWAPI::Client::Projects::Signals
|
92
|
+
include BWAPI::Client::Projects::Summary
|
93
|
+
include BWAPI::Client::Projects::Sharing
|
94
|
+
include BWAPI::Client::Projects::StreamDashboards
|
91
95
|
include BWAPI::Client::Projects::Queries
|
92
|
-
include BWAPI::Client::Projects::Query::MentionFind
|
93
96
|
include BWAPI::Client::Projects::QueryGroups
|
94
97
|
include BWAPI::Client::Projects::Rules
|
95
|
-
include BWAPI::Client::Projects::Sharing
|
96
|
-
include BWAPI::Client::Projects::Signals
|
97
|
-
include BWAPI::Client::Projects::StreamDashboards
|
98
|
-
include BWAPI::Client::Projects::Summary
|
99
98
|
include BWAPI::Client::Projects::Tags
|
100
|
-
include BWAPI::Client::Projects::TwitterQueries
|
101
99
|
include BWAPI::Client::Projects::Users
|
102
100
|
include BWAPI::Client::Projects::Workflow
|
103
101
|
end
|
File without changes
|
File without changes
|
@@ -1,14 +1,4 @@
|
|
1
|
-
require 'bwapi/client/projects/data/audience'
|
2
|
-
require 'bwapi/client/projects/data/audience_activity'
|
3
|
-
require 'bwapi/client/projects/data/channel_metrics'
|
4
|
-
require 'bwapi/client/projects/data/emoticons'
|
5
|
-
require 'bwapi/client/projects/data/hashtags'
|
6
|
-
require 'bwapi/client/projects/data/headlines'
|
7
|
-
require 'bwapi/client/projects/data/mentioned_authors'
|
8
|
-
require 'bwapi/client/projects/data/impressions'
|
9
1
|
require 'bwapi/client/projects/data/mentions'
|
10
|
-
require 'bwapi/client/projects/data/owner_activity'
|
11
|
-
require 'bwapi/client/projects/data/urls'
|
12
2
|
require 'bwapi/client/projects/data/volume'
|
13
3
|
|
14
4
|
module BWAPI
|
@@ -39,17 +29,7 @@ module BWAPI
|
|
39
29
|
get "projects/#{project_id}/data/headlines", opts
|
40
30
|
end
|
41
31
|
|
42
|
-
include BWAPI::Client::Projects::Data::Audience
|
43
|
-
include BWAPI::Client::Projects::Data::AudienceActivity
|
44
|
-
include BWAPI::Client::Projects::Data::ChannelMetrics
|
45
|
-
include BWAPI::Client::Projects::Data::Emoticons
|
46
|
-
include BWAPI::Client::Projects::Data::Hashtags
|
47
|
-
include BWAPI::Client::Projects::Data::Headlines
|
48
|
-
include BWAPI::Client::Projects::Data::Impressions
|
49
|
-
include BWAPI::Client::Projects::Data::MentionedAuthors
|
50
32
|
include BWAPI::Client::Projects::Data::Mentions
|
51
|
-
include BWAPI::Client::Projects::Data::OwnerActivity
|
52
|
-
include BWAPI::Client::Projects::Data::Urls
|
53
33
|
include BWAPI::Client::Projects::Data::Volume
|
54
34
|
end
|
55
35
|
end
|
@@ -31,7 +31,7 @@ module BWAPI
|
|
31
31
|
patch "projects/#{project_id}/data/mentions", opts
|
32
32
|
end
|
33
33
|
|
34
|
-
# Get mentions that fall within the submitted filters with
|
34
|
+
# Get mentions that fall within the submitted filters with fulltext
|
35
35
|
#
|
36
36
|
# @param project_id [Integer] Id of project
|
37
37
|
# @param opts [Hash] options hash of parameters
|
@@ -42,7 +42,7 @@ module BWAPI
|
|
42
42
|
# @option opts [String] orderDirection Direction of sort
|
43
43
|
# @option opts [Integer] orderByCategory Category to sort by when orderBy category
|
44
44
|
# @return [Hash] All Mentions
|
45
|
-
def
|
45
|
+
def data_mentions_fulltext(project_id, opts = {})
|
46
46
|
get "projects/#{project_id}/data/mentions/fulltext", opts
|
47
47
|
end
|
48
48
|
|
@@ -61,36 +61,6 @@ module BWAPI
|
|
61
61
|
get "projects/#{project_id}/data/mentions/tweets", opts
|
62
62
|
end
|
63
63
|
|
64
|
-
# Get mentions that fall within the submitted filters for all facebook posts
|
65
|
-
#
|
66
|
-
# @param project_id [Integer] Id of project
|
67
|
-
# @param opts [Hash] options hash of parameters
|
68
|
-
# @option opts [Hash] filter The filters to apply
|
69
|
-
# @option opts [Integer] page Page of projects to retrieve
|
70
|
-
# @option opts [Integer] pageSize Results per page of results
|
71
|
-
# @option opts [String] orderBy Parameter to sort by
|
72
|
-
# @option opts [String] orderDirection Direction of sort
|
73
|
-
# @option opts [Integer] orderByCategory Category to sort by when orderBy category
|
74
|
-
# @return [Hash] All Mentions
|
75
|
-
def data_mentions_facebook_posts(project_id, opts = {})
|
76
|
-
get "projects/#{project_id}/data/mentions/facebookposts", opts
|
77
|
-
end
|
78
|
-
|
79
|
-
# Get mentions that fall within the submitted filters for all facebook comments
|
80
|
-
#
|
81
|
-
# @param project_id [Integer] Id of project
|
82
|
-
# @param opts [Hash] options hash of parameters
|
83
|
-
# @option opts [Hash] filter The filters to apply
|
84
|
-
# @option opts [Integer] page Page of projects to retrieve
|
85
|
-
# @option opts [Integer] pageSize Results per page of results
|
86
|
-
# @option opts [String] orderBy Parameter to sort by
|
87
|
-
# @option opts [String] orderDirection Direction of sort
|
88
|
-
# @option opts [Integer] orderByCategory Category to sort by when orderBy category
|
89
|
-
# @return [Hash] All Mentions
|
90
|
-
def data_mentions_facebook_comments(project_id, opts = {})
|
91
|
-
get "projects/#{project_id}/data/mentions/facebookcomments", opts
|
92
|
-
end
|
93
|
-
|
94
64
|
include BWAPI::Client::Projects::Data::Mentions::Notes
|
95
65
|
end
|
96
66
|
end
|
@@ -10,22 +10,20 @@ module BWAPI
|
|
10
10
|
# @param projectId [Integer] Id of the existing project
|
11
11
|
# @option opts [Integer] page Page of results to retrieve
|
12
12
|
# @option opts [Integer] pageSize Results per page of results
|
13
|
-
# @return [Hash]
|
13
|
+
# @return [Hash] All signal groups for project
|
14
14
|
def signal_groups(project_id, opts = {})
|
15
15
|
get "/projects/#{project_id}/signals/groups", opts
|
16
16
|
end
|
17
17
|
|
18
18
|
# Get a specific signal group
|
19
|
-
#
|
20
19
|
# @param projectId [Integer] Id of project
|
21
20
|
# @param groupId [Integer] Id of group
|
22
|
-
# @return [Hash]
|
21
|
+
# @return [Hash] specific signals group
|
23
22
|
def get_signal_group(project_id, group_id)
|
24
23
|
get "/projects/#{project_id}/signals/groups/#{group_id}"
|
25
24
|
end
|
26
25
|
|
27
26
|
# Create a new signal group
|
28
|
-
#
|
29
27
|
# @param projectId [Integer] Project ID of the Signal Group to be updated
|
30
28
|
# @param opts [Hash] options hash of parameters
|
31
29
|
# @option opts [Integer] projectId Project ID of Signal Group
|
@@ -35,13 +33,12 @@ module BWAPI
|
|
35
33
|
# @option opts [Date] lastModified Last modified date of the Signal Group
|
36
34
|
# @option opts [Integer] id ID of Signal Group
|
37
35
|
# @option opts [String] creator Creator of the Signal Group
|
38
|
-
# @return [Hash]
|
36
|
+
# @return [Hash] new signal group
|
39
37
|
def create_signal_group(project_id, opts = {})
|
40
38
|
post "/projects/#{project_id}/signals/groups", opts
|
41
39
|
end
|
42
40
|
|
43
41
|
# Update a signal group
|
44
|
-
#
|
45
42
|
# @param projectId [Integer] Project ID of the Signal Group to be updated
|
46
43
|
# @param groupId [Integer] Id of group
|
47
44
|
# @param opts [Hash] options hash of parameters
|
@@ -52,28 +49,18 @@ module BWAPI
|
|
52
49
|
# @option opts [Date] lastModified Last modified date of the Signal Group
|
53
50
|
# @option opts [Integer] id ID of Signal Group
|
54
51
|
# @option opts [String] creator Creator of the Signal Group
|
55
|
-
# @return [Hash]
|
52
|
+
# @return [Hash] updated signal group
|
56
53
|
def update_signal_group(project_id, group_id, opts = {})
|
57
54
|
put "/projects/#{project_id}/signals/groups/#{group_id}", opts
|
58
55
|
end
|
59
56
|
|
60
57
|
# Delete a signal group
|
61
|
-
#
|
62
58
|
# @param projectId [Integer] Id of project
|
63
59
|
# @param groupId [Integer] Id of group
|
64
|
-
# @return [Hash]
|
60
|
+
# @return [Hash] deleted signal group
|
65
61
|
def delete_signal_group(project_id, group_id)
|
66
62
|
delete "/projects/#{project_id}/signals/groups/#{group_id}"
|
67
63
|
end
|
68
|
-
|
69
|
-
# Get all signals for a specific group
|
70
|
-
#
|
71
|
-
# @param projectId [Integer] Id of project
|
72
|
-
# @param groupId [Integer] Id of group
|
73
|
-
# @return [Hash] Returns a specific signal group signals
|
74
|
-
def get_signal_group_signals(project_id, group_id)
|
75
|
-
get "/projects/#{project_id}/signals/groups/#{group_id}/signals"
|
76
|
-
end
|
77
64
|
end
|
78
65
|
end
|
79
66
|
end
|