bwapi 6.4.2 → 6.5.0.pre.256
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 +13 -5
- data/bwapi.gemspec +1 -1
- data/lib/bwapi/client.rb +2 -0
- data/lib/bwapi/client/location.rb +26 -0
- data/lib/bwapi/client/projects.rb +2 -0
- data/lib/bwapi/client/projects/bulkactions.rb +28 -0
- data/lib/bwapi/client/projects/bulkactions/author.rb +27 -0
- data/lib/bwapi/client/projects/bulkactions/mentions.rb +23 -0
- data/lib/bwapi/client/projects/rules/copy.rb +1 -2
- data/lib/bwapi/version.rb +1 -1
- metadata +9 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
|
|
2
|
+
!binary "U0hBMQ==":
|
|
3
|
+
metadata.gz: !binary |-
|
|
4
|
+
YzIwY2M1NmRjOWYyMmM1NTdmMjkyM2Q4ZDdmNjU3MWM3Njc5ZjVkYQ==
|
|
5
|
+
data.tar.gz: !binary |-
|
|
6
|
+
NmNjZmFmMDUwNjRmY2I5YWI1MmEzZjc0MDRiZWMyMDA4ODZiZThlZA==
|
|
5
7
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
|
|
8
|
+
metadata.gz: !binary |-
|
|
9
|
+
MTE2ZmE0M2QxNDQ3Nzg3NzYzZDUzMGYzOTk4NDlkYmIyNjk0NmRkZTlmZjA3
|
|
10
|
+
YjQ2YWI1MDRjMmY0MDk5YTdjNTMxNmE1MjFiNGNiNmNlMGEyNzRjNDYxMjdi
|
|
11
|
+
ODllYWMwOTA5MzAzNzBlYjlkNmZlZWQ2MWVjMmY2ZmVlMGZmNjQ=
|
|
12
|
+
data.tar.gz: !binary |-
|
|
13
|
+
NWZlNWFlZDAwMjM1OWFiZDY0MTE5MDZiZjYyYWZhZDgxNGU0MGFlZjYzNzU2
|
|
14
|
+
YzM5Njc3MzY0MWFmYTliYmVmZDE0ZjJjYzM4ZmYyZjk1MDlkZjUzNzZlZGVl
|
|
15
|
+
ODVhYTEwMmFjZWVmODQ3YWM4Yjc4MjE1Nzg2Njk1MmRlM2VmYTk=
|
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-
|
|
7
|
+
s.date = '2014-04-30'
|
|
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
|
@@ -9,6 +9,7 @@ require 'bwapi/client/command_center'
|
|
|
9
9
|
require 'bwapi/client/error_codes'
|
|
10
10
|
require 'bwapi/client/filters'
|
|
11
11
|
require 'bwapi/client/languages'
|
|
12
|
+
require 'bwapi/client/location'
|
|
12
13
|
require 'bwapi/client/logout'
|
|
13
14
|
require 'bwapi/client/me'
|
|
14
15
|
require 'bwapi/client/metrics'
|
|
@@ -46,6 +47,7 @@ module BWAPI
|
|
|
46
47
|
include BWAPI::Client::ErrorCodes
|
|
47
48
|
include BWAPI::Client::Filters
|
|
48
49
|
include BWAPI::Client::Languages
|
|
50
|
+
include BWAPI::Client::Location
|
|
49
51
|
include BWAPI::Client::Logout
|
|
50
52
|
include BWAPI::Client::Me
|
|
51
53
|
include BWAPI::Client::Metrics
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module BWAPI
|
|
2
|
+
class Client
|
|
3
|
+
# Location module for locations endpoints
|
|
4
|
+
module Location
|
|
5
|
+
|
|
6
|
+
# Request the information for a given location code
|
|
7
|
+
#
|
|
8
|
+
# @return [Hashie::Mash] Information about the location
|
|
9
|
+
def location location_code
|
|
10
|
+
get "location/#{location_code}"
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# Autocomplete a location name with candidates
|
|
14
|
+
#
|
|
15
|
+
# @param opts [String] prefix that the location starts with
|
|
16
|
+
# @option opts [Array] a list of location types to return
|
|
17
|
+
# @option opts [Integer] page number of results to retrieve
|
|
18
|
+
# @option opts [Integer] pageSize of the results to retrieve
|
|
19
|
+
# @return [Hashie::Mash] The list of matching locations
|
|
20
|
+
def location_autocomplete opts={}
|
|
21
|
+
post "location/autocomplete", opts
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
require 'bwapi/client/projects/bulkactions'
|
|
1
2
|
require 'bwapi/client/projects/categories'
|
|
2
3
|
require 'bwapi/client/projects/data'
|
|
3
4
|
require 'bwapi/client/projects/data_download'
|
|
@@ -80,6 +81,7 @@ module BWAPI
|
|
|
80
81
|
delete "projects/#{project_id}"
|
|
81
82
|
end
|
|
82
83
|
|
|
84
|
+
include BWAPI::Client::Projects::BulkActions
|
|
83
85
|
include BWAPI::Client::Projects::Categories
|
|
84
86
|
include BWAPI::Client::Projects::Data
|
|
85
87
|
include BWAPI::Client::Projects::DataDownload
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
require 'bwapi/client/projects/bulkactions/mentions'
|
|
2
|
+
require 'bwapi/client/projects/bulkactions/author'
|
|
3
|
+
|
|
4
|
+
module BWAPI
|
|
5
|
+
class Client
|
|
6
|
+
module Projects
|
|
7
|
+
# BulkActions module for projects/bulkactions endpoint
|
|
8
|
+
module BulkActions
|
|
9
|
+
|
|
10
|
+
# Get all bulk actions in project
|
|
11
|
+
#
|
|
12
|
+
# @param project_id [Integer] Id of project
|
|
13
|
+
# @param opts [Hash] options hash of parameters
|
|
14
|
+
# @option opts [Integer] page Page of projects to retrieve
|
|
15
|
+
# @option opts [Integer] pageSize Results per page of results
|
|
16
|
+
# @option opts [String] sinceDate the start date to get bulk actions from
|
|
17
|
+
# @return [Hashie::Mash] All bulk actions in project
|
|
18
|
+
def bulk_actions project_id, opts={}
|
|
19
|
+
get "projects/#{project_id}/bulkactions", opts
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
include BWAPI::Client::Projects::BulkActions::Mentions
|
|
23
|
+
include BWAPI::Client::Projects::BulkActions::Author
|
|
24
|
+
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
module BWAPI
|
|
2
|
+
class Client
|
|
3
|
+
module Projects
|
|
4
|
+
module BulkActions
|
|
5
|
+
# Author module for projects/bulkactions/author endpoints
|
|
6
|
+
module Author
|
|
7
|
+
|
|
8
|
+
# Create a new bulk action in project for an author
|
|
9
|
+
#
|
|
10
|
+
# @param project_id [Integer] Id of project
|
|
11
|
+
# @param opts [Hash] options hash of parameters
|
|
12
|
+
# @option opts [String] accountType Account type to assign
|
|
13
|
+
# @option opts [String] authorName Author's name
|
|
14
|
+
# @option opts [String] domain Author's domain
|
|
15
|
+
# @option opts [String] gender Gender to assign
|
|
16
|
+
# @option opts [Integer] id of the bulk action
|
|
17
|
+
# @option opts [Array] interests list<String> Interests to assign
|
|
18
|
+
# @option opts [Array] professions list<AuthorProfessionDTO> Professions to assign
|
|
19
|
+
# @return [Hashie::Mash] New bulk action for mentions
|
|
20
|
+
def bulk_edit_author project_id, opts={}
|
|
21
|
+
post "projects/#{project_id}/bulkactions/author", opts
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module BWAPI
|
|
2
|
+
class Client
|
|
3
|
+
module Projects
|
|
4
|
+
module BulkActions
|
|
5
|
+
# Mentions module for projects/bulkactions/mentions endpoints
|
|
6
|
+
module Mentions
|
|
7
|
+
|
|
8
|
+
# Create a new bulk action in project for mentions
|
|
9
|
+
#
|
|
10
|
+
# @param project_id [Integer] Id of project
|
|
11
|
+
# @param opts [Hash] options hash of parameters
|
|
12
|
+
# @option opts [Hash] action <mention patch dto> to apply to these mentions
|
|
13
|
+
# @option opts [Hash] filter <filter dto> to specify what kind of mentions this bulk action should apply to
|
|
14
|
+
# @option opts [Integer] sampleAmount Amount to be sample by this bulk action
|
|
15
|
+
# @return [Hashie::Mash] New bulk action for mentions
|
|
16
|
+
def bulk_edit_mentions project_id, opts={}
|
|
17
|
+
post "projects/#{project_id}/bulkactions/mentions", opts
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -11,10 +11,9 @@ module BWAPI
|
|
|
11
11
|
# @param rule_id [Integer] id The id of rule
|
|
12
12
|
# @param opts [Hash] options Hash of parameters
|
|
13
13
|
# @option opts [Integer] copyToProjectId the target project id
|
|
14
|
-
# @option opts [Boolean] backdate Starts a backfill if true
|
|
15
14
|
# @return [Hashie::Mash] New rule created in project
|
|
16
15
|
def create_rule_copy project_id, rule_id, opts={}
|
|
17
|
-
|
|
16
|
+
post "projects/#{project_id}/rules/#{rule_id}/copy", opts
|
|
18
17
|
end
|
|
19
18
|
|
|
20
19
|
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: 6.
|
|
4
|
+
version: 6.5.0.pre.256
|
|
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-
|
|
11
|
+
date: 2014-04-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|
|
@@ -151,12 +151,16 @@ files:
|
|
|
151
151
|
- lib/bwapi/client/error_codes.rb
|
|
152
152
|
- lib/bwapi/client/filters.rb
|
|
153
153
|
- lib/bwapi/client/languages.rb
|
|
154
|
+
- lib/bwapi/client/location.rb
|
|
154
155
|
- lib/bwapi/client/logout.rb
|
|
155
156
|
- lib/bwapi/client/me.rb
|
|
156
157
|
- lib/bwapi/client/metrics.rb
|
|
157
158
|
- lib/bwapi/client/oauth.rb
|
|
158
159
|
- lib/bwapi/client/ping.rb
|
|
159
160
|
- lib/bwapi/client/projects.rb
|
|
161
|
+
- lib/bwapi/client/projects/bulkactions.rb
|
|
162
|
+
- lib/bwapi/client/projects/bulkactions/author.rb
|
|
163
|
+
- lib/bwapi/client/projects/bulkactions/mentions.rb
|
|
160
164
|
- lib/bwapi/client/projects/categories.rb
|
|
161
165
|
- lib/bwapi/client/projects/data.rb
|
|
162
166
|
- lib/bwapi/client/projects/data/mentions.rb
|
|
@@ -212,14 +216,14 @@ require_paths:
|
|
|
212
216
|
- lib
|
|
213
217
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
214
218
|
requirements:
|
|
215
|
-
- - '>='
|
|
219
|
+
- - ! '>='
|
|
216
220
|
- !ruby/object:Gem::Version
|
|
217
221
|
version: 1.9.2
|
|
218
222
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
219
223
|
requirements:
|
|
220
|
-
- - '
|
|
224
|
+
- - ! '>'
|
|
221
225
|
- !ruby/object:Gem::Version
|
|
222
|
-
version:
|
|
226
|
+
version: 1.3.1
|
|
223
227
|
requirements: []
|
|
224
228
|
rubyforge_project:
|
|
225
229
|
rubygems_version: 2.2.2
|
|
@@ -232,4 +236,3 @@ test_files:
|
|
|
232
236
|
- spec/bwapi_spec.rb
|
|
233
237
|
- spec/fixtures/.netrc
|
|
234
238
|
- spec/helper.rb
|
|
235
|
-
has_rdoc:
|