bwapi 6.0.0 → 6.1.0.pre.192

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,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 96eef0b6c0c2306105f74c0fceb1f6136be65a3b
4
- data.tar.gz: 4ca59779c67d6dff8be4c6b3fe0c768053d901fa
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MTZkNmRmMDljNjVkZjFiNzJjMGMyYzg0NWVhNDRiZTQ5MzVhYWY4OQ==
5
+ data.tar.gz: !binary |-
6
+ ODhhMTBlZGNjZWU0NjVjMzQ5YjJlZDRhMThlNzEzM2ViNGRhMzljOA==
5
7
  SHA512:
6
- metadata.gz: d4840ade2e24a91d04b847e9d27689d38cc24ea6ad7445845f3acb2e41dea120f532a4b55fd2dcbcb2452a1689c3105204499cce3f1180a927798909597b6c74
7
- data.tar.gz: f8d424e1a01f484a7860ffd81fe67a686abba2ce3ed66fbf1eb4522d29f3b650c9196d1eaf643b346b74891f4022f45197839d4b83a2524ff9c3a90419e9298c
8
+ metadata.gz: !binary |-
9
+ MGRmYWRhOGIyNjVjYjg4Y2IwMmJhNmE4YWMxNzQ3ZDNjZWMxNWNlZjY3NDRh
10
+ MGM3OGE2Y2JhNWMwZDRkZThiYTUyMzJhMDA5NjJlYTM5Mjg2ZDc1ZGYwZTc3
11
+ N2NkMWMzMTA4MDZmZjQyZjk2YWJlMmQ0MGEzNzRmOWJhZjJjM2M=
12
+ data.tar.gz: !binary |-
13
+ ODJiNjM5OGMwMTE5YmI1NTgzNjEyYzI5MzQ1NjNjNmY1NjEwNWNjYjkwOGI2
14
+ YTk3YTdkMTE2OTM0ZGEzZjExYzgzZTJjMzNiZDAzZDExNjQwZTkxNTEzNzYx
15
+ Zjc1MjhlMTdhYWEzMzVkNDIzMjNhZTQyNWEyNWQyZThjODIzODI=
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-02-11'
7
+ s.date = '2014-02-14'
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.rb CHANGED
@@ -7,8 +7,10 @@ require 'bwapi/client/brandwatch'
7
7
  require 'bwapi/client/client'
8
8
  require 'bwapi/client/error_codes'
9
9
  require 'bwapi/client/filters'
10
+ require 'bwapi/client/languages'
10
11
  require 'bwapi/client/logout'
11
12
  require 'bwapi/client/me'
13
+ require 'bwapi/client/metrics'
12
14
  require 'bwapi/client/oauth'
13
15
  require 'bwapi/client/ping'
14
16
  require 'bwapi/client/sso'
@@ -41,8 +43,10 @@ module BWAPI
41
43
  include BWAPI::Client::Client
42
44
  include BWAPI::Client::ErrorCodes
43
45
  include BWAPI::Client::Filters
46
+ include BWAPI::Client::Languages
44
47
  include BWAPI::Client::Logout
45
48
  include BWAPI::Client::Me
49
+ include BWAPI::Client::Metrics
46
50
  include BWAPI::Client::OAuth
47
51
  include BWAPI::Client::Ping
48
52
  include BWAPI::Client::Projects
@@ -0,0 +1,15 @@
1
+ module BWAPI
2
+ class Client
3
+ # Languages module for languages endpoints
4
+ module Languages
5
+
6
+ # Get the current language list
7
+ #
8
+ # @return [Hashie::Mash] Languages information
9
+ def languages
10
+ get "languages"
11
+ end
12
+
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ module BWAPI
2
+ class Client
3
+ # Metrics module for metrics endpoints
4
+ module Metrics
5
+
6
+ # Get the current metrics list
7
+ #
8
+ # @return [Hashie::Mash] Metrics information
9
+ def metrics
10
+ get "metrics"
11
+ end
12
+
13
+ end
14
+ end
15
+ end
@@ -9,6 +9,7 @@ require 'bwapi/client/projects/sharing'
9
9
  require 'bwapi/client/projects/stream_dashboards'
10
10
  require 'bwapi/client/projects/queries'
11
11
  require 'bwapi/client/projects/query_groups'
12
+ require 'bwapi/client/projects/rules'
12
13
  require 'bwapi/client/projects/tags'
13
14
  require 'bwapi/client/projects/users'
14
15
  require 'bwapi/client/projects/workflow'
@@ -88,6 +89,7 @@ module BWAPI
88
89
  include BWAPI::Client::Projects::StreamDashboards
89
90
  include BWAPI::Client::Projects::Queries
90
91
  include BWAPI::Client::Projects::QueryGroups
92
+ include BWAPI::Client::Projects::Rules
91
93
  include BWAPI::Client::Projects::Tags
92
94
  include BWAPI::Client::Projects::Users
93
95
  include BWAPI::Client::Projects::Workflow
@@ -0,0 +1,82 @@
1
+ require 'bwapi/client/projects/rules/backfill'
2
+ require 'bwapi/client/projects/rules/copy'
3
+
4
+ module BWAPI
5
+ class Client
6
+ module Projects
7
+ # Rules module for projects/rules endpoints
8
+ module Rules
9
+
10
+ # Get all rules in project
11
+ #
12
+ # @param project_id [Integer] The id of project
13
+ # @param opts [Hash] options Hash of parameters
14
+ # @option opts [String] nameContains Partial name to filter by
15
+ # @option opts [Boolean] getPaused Includes the paused rules if true
16
+ # @option opts [Integer] page Page Number of results to retrieve
17
+ # @option opts [Integer] pageSize Results per page of results
18
+ # @return [Hashie::Mash] All rules in project
19
+ def rules project_id, opts={}
20
+ get "projects/#{project_id}/rules", opts
21
+ end
22
+
23
+ # Get a specific rule in project
24
+ #
25
+ # @param project_id [Integer] id The id of project
26
+ # @param rule_id [Integer] id The id of rule
27
+ # @return [Hashie::Mash] Specific rule
28
+ def get_rule project_id, rule_id
29
+ get "projects/#{project_id}/rules/#{rule_id}"
30
+ end
31
+ alias :rule :get_rule
32
+
33
+ # Create a new rule in project
34
+ #
35
+ # @param project_id [Integer] The project id
36
+ # @param opts [Hash] options Hash of parameters
37
+ # @option opts [String] id The rule id
38
+ # @option opts [String] name The name of the rule
39
+ # @option opts [Hash] filter Filter object
40
+ # @option opts [String] scope The scope of the rule
41
+ # @option opts [Boolean] enabled If the rule is paused
42
+ # @option opts [Hash] rule Rule object
43
+ # @option opts [String] queryName The query name the rule is applied to
44
+ # @option opts [String] projectName The project name the rule is applied to
45
+ # @return [Hashie::Mash] New rule
46
+ def create_rule project_id, opts={}
47
+ post "projects/#{project_id}/rules", opts
48
+ end
49
+
50
+ # Update an existing rule in project
51
+ #
52
+ # @param project_id [Integer] The project id
53
+ # @param opts [Hash] options Hash of parameters
54
+ # @option opts [String] id The rule id
55
+ # @option opts [String] name The name of the rule
56
+ # @option opts [Hash] filter Filter object
57
+ # @option opts [String] scope The scope of the rule
58
+ # @option opts [Boolean] enabled If the rule is paused
59
+ # @option opts [Hash] rule Rule object
60
+ # @option opts [String] queryName The query name the rule is applied to
61
+ # @option opts [String] projectName The project name the rule is applied to
62
+ # @return [Hashie::Mash] Updated rule
63
+ def update_rule project_id, rule_id, opts={}
64
+ put "projects/#{project_id}/rules/#{rule_id}", opts
65
+ end
66
+
67
+ # Delete an existing rule project
68
+ #
69
+ # @param project_id [Integer] Id The project id
70
+ # @param rule_id [Integer] Id The rule id
71
+ # @return [Hashie::Mash] Deleted rule
72
+ def delete_rule project_id, rule_id
73
+ delete "projects/#{project_id}/rules/#{rule_id}"
74
+ end
75
+
76
+ include BWAPI::Client::Projects::Rules::Backfill
77
+ include BWAPI::Client::Projects::Rules::Copy
78
+
79
+ end
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,21 @@
1
+ module BWAPI
2
+ class Client
3
+ module Projects
4
+ module Rules
5
+ # Backfill module for projects/rules/backfill endpoint
6
+ module Backfill
7
+
8
+ # Create a backfill for a rule in project
9
+ #
10
+ # @param project_id [Integer] id The id of project
11
+ # @param rule_id [Integer] id The id of rule
12
+ # @return [Hashie::Mash] Specific rule backfill
13
+ def create_rule_backfill project_id, rule_id
14
+ post "projects/#{project_id}/rules/#{rule_id}/backfill"
15
+ end
16
+
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,24 @@
1
+ module BWAPI
2
+ class Client
3
+ module Projects
4
+ module Rules
5
+ # Backfill module for projects/rules/copy endpoint
6
+ module Copy
7
+
8
+ # Copy a rule to another project
9
+ #
10
+ # @param project_id [Integer] id The id of project
11
+ # @param rule_id [Integer] id The id of rule
12
+ # @param opts [Hash] options Hash of parameters
13
+ # @option opts [Integer] copyToProjectId the target project id
14
+ # @option opts [Boolean] backdate Starts a backfill if true
15
+ # @return [Hashie::Mash] New rule created in project
16
+ def create_rule_backfill project_id, rule_id, opts={}
17
+ get "projects/#{project_id}/rules/#{rule_id}/copy", opts
18
+ end
19
+
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
data/lib/bwapi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module BWAPI
2
- VERSION = "6.0.0"
2
+ VERSION = "6.1.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.0.0
4
+ version: 6.1.0.pre.192
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-11 00:00:00.000000000 Z
11
+ date: 2014-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -137,8 +137,10 @@ files:
137
137
  - lib/bwapi/client/client.rb
138
138
  - lib/bwapi/client/error_codes.rb
139
139
  - lib/bwapi/client/filters.rb
140
+ - lib/bwapi/client/languages.rb
140
141
  - lib/bwapi/client/logout.rb
141
142
  - lib/bwapi/client/me.rb
143
+ - lib/bwapi/client/metrics.rb
142
144
  - lib/bwapi/client/oauth.rb
143
145
  - lib/bwapi/client/ping.rb
144
146
  - lib/bwapi/client/projects.rb
@@ -153,6 +155,9 @@ files:
153
155
  - lib/bwapi/client/projects/queries/date_range.rb
154
156
  - lib/bwapi/client/projects/queries/mentions.rb
155
157
  - lib/bwapi/client/projects/query_groups.rb
158
+ - lib/bwapi/client/projects/rules.rb
159
+ - lib/bwapi/client/projects/rules/backfill.rb
160
+ - lib/bwapi/client/projects/rules/copy.rb
156
161
  - lib/bwapi/client/projects/sharing.rb
157
162
  - lib/bwapi/client/projects/signals.rb
158
163
  - lib/bwapi/client/projects/stream_dashboards.rb
@@ -189,17 +194,17 @@ require_paths:
189
194
  - lib
190
195
  required_ruby_version: !ruby/object:Gem::Requirement
191
196
  requirements:
192
- - - '>='
197
+ - - ! '>='
193
198
  - !ruby/object:Gem::Version
194
199
  version: 1.9.2
195
200
  required_rubygems_version: !ruby/object:Gem::Requirement
196
201
  requirements:
197
- - - '>='
202
+ - - ! '>'
198
203
  - !ruby/object:Gem::Version
199
- version: '0'
204
+ version: 1.3.1
200
205
  requirements: []
201
206
  rubyforge_project:
202
- rubygems_version: 2.2.1
207
+ rubygems_version: 2.2.2
203
208
  signing_key:
204
209
  specification_version: 4
205
210
  summary: Brandwatch API Wrapper
@@ -209,4 +214,3 @@ test_files:
209
214
  - spec/bwapi_spec.rb
210
215
  - spec/fixtures/.netrc
211
216
  - spec/helper.rb
212
- has_rdoc: