bwapi 6.3.0.pre.228 → 6.4.0.pre.233

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
- ZmQ2MGYxNGY4NDAwMTU1YTJlNjRiZTAyMDBhMTFlMmIzMDk1MGU1Zg==
4
+ ZmEwZjNkZjk4NjlkYjM2YTY3NzhjMDVlZTI2ZGY5YTFiZDhjNjMxZA==
5
5
  data.tar.gz: !binary |-
6
- NjA5OTRlZmJkYTVkN2Q2MDFhYzBlNmQ5NmNiMDk3NjNmNGZjZWMzMQ==
6
+ ZjUzZDRkZTI3MzRhMjBiNjA0NDJjZjUxZjhiOGQyZDc2MGIwYzNiYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjQ5ODIzYjUyOTY1YTUyMTNlYzkwNTJmYmRjZjFhOTEyYzc4OGI2NDQ0ZDAy
10
- MTAyZjRjYWVjMGNjZDBiZmYxZGMzY2ZkODdmYzdiY2Q5OWRmMzliOTdmZjIz
11
- ODY4NzgwNmY0ZGI3NjQyMTA0N2M4ZDdmNTQ0NTQ2ZjMwODUxZDY=
9
+ OWY2OGNmYTkyYWE4ODMxNDYxNTFjYTRiNDUxNTcyZTQyNGMyNTM5MmQ1NjBh
10
+ ZGQyNWFmOTUwNDQ3MGJjZDk0MDhhODMzMWY1NTNkZDlhODgyMGM4ZDU4MDM4
11
+ OWVhZjM1OGQyZmUzMDY1ODZhZTkxZDQ3MGRiODg5MmJiNTQ1MDM=
12
12
  data.tar.gz: !binary |-
13
- YTJhZDcxYmE4YTcyYzgxMThiM2UyZDJhN2Q4Yjc2NTNkMzgxNGQ2M2I5NmM3
14
- NjdiNGU0ZDliZmMzMjYyNTk1NzY1MDgyNDQyZDg5NzhjOGJjNjc1OWRhNjE0
15
- NDQ1ZGJlNTc1MDBhZGM5NDBiMDM0MTg5YWZmNzA5ZDRlZjlmMWY=
13
+ MDIyYmVlNDQ5NTA4NWEyYjlmNzVhYTAxNTlmMDk5NzBmOTU5YzFlNTkxNzMy
14
+ OTJiZWViYzU4NjE3NGNlNDllNzAwNDg0OTNkNzVhY2I3MjY5NGE2OGY4ODVj
15
+ NjY1ZWYxODdjMmMyMWFjZjkxOTBlMTc0YWI0YjRjODE2MWU0ZWY=
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem "coveralls", "~> 0.6.7", require: false
3
+ gem "coveralls", "~> 0.7.0", require: false
4
4
  gem 'simplecov'
5
5
 
6
6
  gemspec
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-19'
7
+ s.date = '2014-03-17'
8
8
  s.summary = 'Brandwatch API Wrapper'
9
9
  s.description = 'A Ruby wrapper for the Brandwatch API'
10
10
  s.author = 'Jonathan Chrisp'
@@ -13,13 +13,13 @@ Gem::Specification.new do |s|
13
13
  s.homepage = 'https://github.com/jonathanchrisp/bwapi'
14
14
  s.required_ruby_version = ">= 1.9.2"
15
15
 
16
- s.add_development_dependency 'rspec', '~> 2.13.0'
16
+ s.add_development_dependency 'rspec', '~> 2.14.1'
17
17
 
18
18
  s.add_runtime_dependency 'colored', '~> 1.2'
19
19
  s.add_runtime_dependency 'faraday', '~> 0.8.7'
20
20
  s.add_runtime_dependency 'faraday_middleware', '~> 0.9.0'
21
21
  s.add_runtime_dependency 'hashie', '~> 2.0.5'
22
- s.add_runtime_dependency 'multi_json', '~> 1.8.2'
22
+ s.add_runtime_dependency 'multi_json', '~> 1.9.0'
23
23
  s.add_runtime_dependency 'netrc', '~> 0.7.7'
24
24
 
25
25
  s.files = `git ls-files`.split("\n")
@@ -4,6 +4,7 @@ require 'bwapi/client/projects/data_download'
4
4
  require 'bwapi/client/projects/demographics'
5
5
  require 'bwapi/client/projects/facebook_queries'
6
6
  require 'bwapi/client/projects/twitter_queries'
7
+ require 'bwapi/client/projects/group'
7
8
  require 'bwapi/client/projects/signals'
8
9
  require 'bwapi/client/projects/summary'
9
10
  require 'bwapi/client/projects/sharing'
@@ -84,6 +85,7 @@ module BWAPI
84
85
  include BWAPI::Client::Projects::DataDownload
85
86
  include BWAPI::Client::Projects::Demographics
86
87
  include BWAPI::Client::Projects::FacebookQueries
88
+ include BWAPI::Client::Projects::Group
87
89
  include BWAPI::Client::Projects::TwitterQueries
88
90
  include BWAPI::Client::Projects::Signals
89
91
  include BWAPI::Client::Projects::Summary
@@ -0,0 +1,17 @@
1
+ require 'bwapi/client/projects/group/author_group'
2
+ require 'bwapi/client/projects/group/location_group'
3
+ require 'bwapi/client/projects/group/site_group'
4
+
5
+ module BWAPI
6
+ class Client
7
+ module Projects
8
+ # Group module for projects/group endpoint
9
+ module Group
10
+
11
+ include BWAPI::Client::Projects::Group::AuthorGroup
12
+ include BWAPI::Client::Projects::Group::LocationGroup
13
+ include BWAPI::Client::Projects::Group::SiteGroup
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,67 @@
1
+ module BWAPI
2
+ class Client
3
+ module Projects
4
+ module Group
5
+ # AuthorGroup module for projects/group/author endpoints
6
+ module AuthorGroup
7
+ # Get summary of all author groups in project
8
+ #
9
+ # @param project_id [Integer] Id of project
10
+ # @return [Hashie::Mash] Summary of all author groups in project
11
+ def author_groups_summary project_id
12
+ get "projects/#{project_id}/group/author/summaryList"
13
+ end
14
+
15
+ # Get a specific author group in project
16
+ #
17
+ # @param project_id [Integer] Id of project
18
+ # @param author_group_id [Integer] Id of author group
19
+ # @return [Hashie::Mash] Specific author group
20
+ def get_author_group project_id, author_group_id
21
+ get "projects/#{project_id}/group/author/#{author_group_id}"
22
+ end
23
+ alias :author_group :get_author_group
24
+
25
+ # Create a new author group in project
26
+ #
27
+ # @param project_id [Integer] Id of project
28
+ # @param opts [Hash] options hash of parameters
29
+ # @option opts [String] name The human readable name for the group
30
+ # @option opts [Integer] userId The id of the creating user
31
+ # @option opts [Array] sharedProjectIds The ids of the shared projects
32
+ # @option opts [String] shared The type of sharing for the group
33
+ # @option opts [Array] authors The authors in the group
34
+ # @return [Hashie::Mash] New author group
35
+ def create_author_group project_id, opts={}
36
+ post "projects/#{project_id}/group/author", opts
37
+ end
38
+
39
+ # Update an existing author group in project
40
+ #
41
+ # @param project_id [Integer] Id of project
42
+ # @param author_group_id [Integer] Id of author group
43
+ # @param opts [Hash] options hash of parameter
44
+ # @option opts [Integer] id The id of the group
45
+ # @option opts [String] name The human readable name for the group
46
+ # @option opts [Integer] userId The id of the creating user
47
+ # @option opts [Array] sharedProjectIds The ids of the shared projects
48
+ # @option opts [String] shared The type of sharing for the group
49
+ # @option opts [Array] authors The authors in the group
50
+ # @return [Hashie::Mash] Updated author group
51
+ def update_author_group project_id, author_group_id, opts={}
52
+ put "projects/#{project_id}/group/author/#{author_group_id}", opts
53
+ end
54
+
55
+ # Delete an existing author group project
56
+ #
57
+ # @param project_id [Integer] Id of project
58
+ # @param author_group_id [Integer] Id of author group
59
+ # @return [Hashie::Mash] Deleted author group
60
+ def delete_author_group project_id, author_group_id
61
+ delete "projects/#{project_id}/group/author/#{author_group_id}"
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,67 @@
1
+ module BWAPI
2
+ class Client
3
+ module Projects
4
+ module Group
5
+ # LocationGroup module for projects/group/location endpoints
6
+ module LocationGroup
7
+ # Get summary of all location groups in project
8
+ #
9
+ # @param project_id [Integer] Id of project
10
+ # @return [Hashie::Mash] Summary of all location groups in project
11
+ def location_groups_summary project_id
12
+ get "projects/#{project_id}/group/location/summaryList"
13
+ end
14
+
15
+ # Get a specific location group in project
16
+ #
17
+ # @param project_id [Integer] Id of project
18
+ # @param location_group_id [Integer] Id of location group
19
+ # @return [Hashie::Mash] Specific location group
20
+ def get_location_group project_id, location_group_id
21
+ get "projects/#{project_id}/group/location/#{location_group_id}"
22
+ end
23
+ alias :location_group :get_location_group
24
+
25
+ # Create a new location group in project
26
+ #
27
+ # @param project_id [Integer] Id of project
28
+ # @param opts [Hash] options hash of parameters
29
+ # @option opts [String] name The human readable name for the group
30
+ # @option opts [Integer] userId The id of the creating user
31
+ # @option opts [Array] sharedProjectIds The ids of the shared projects
32
+ # @option opts [String] shared The type of sharing for the group
33
+ # @option opts [Array] location The location in the group
34
+ # @return [Hashie::Mash] New location group
35
+ def create_location_group project_id, opts={}
36
+ post "projects/#{project_id}/group/location", opts
37
+ end
38
+
39
+ # Update an existing location group in project
40
+ #
41
+ # @param project_id [Integer] Id of project
42
+ # @param location_group_id [Integer] Id of location group
43
+ # @param opts [Hash] options hash of parameter
44
+ # @option opts [Integer] id The id of the group
45
+ # @option opts [String] name The human readable name for the group
46
+ # @option opts [Integer] userId The id of the creating user
47
+ # @option opts [Array] sharedProjectIds The ids of the shared projects
48
+ # @option opts [String] shared The type of sharing for the group
49
+ # @option opts [Array] location The location in the group
50
+ # @return [Hashie::Mash] Updated location group
51
+ def update_location_group project_id, location_group_id, opts={}
52
+ put "projects/#{project_id}/group/location/#{location_group_id}", opts
53
+ end
54
+
55
+ # Delete an existing location group project
56
+ #
57
+ # @param project_id [Integer] Id of project
58
+ # @param location_group_id [Integer] Id of location group
59
+ # @return [Hashie::Mash] Deleted location group
60
+ def delete_location_group project_id, location_group_id
61
+ delete "projects/#{project_id}/group/location/#{location_group_id}"
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,67 @@
1
+ module BWAPI
2
+ class Client
3
+ module Projects
4
+ module Group
5
+ # SiteGroup module for projects/group/site endpoints
6
+ module SiteGroup
7
+ # Get summary of all site groups in project
8
+ #
9
+ # @param project_id [Integer] Id of project
10
+ # @return [Hashie::Mash] Summary of all site groups in project
11
+ def site_groups_summary project_id
12
+ get "projects/#{project_id}/group/site/summaryList"
13
+ end
14
+
15
+ # Get a specific site group in project
16
+ #
17
+ # @param project_id [Integer] Id of project
18
+ # @param site_group_id [Integer] Id of site group
19
+ # @return [Hashie::Mash] Specific site group
20
+ def get_site_group project_id, site_group_id
21
+ get "projects/#{project_id}/group/site/#{site_group_id}"
22
+ end
23
+ alias :site_group :get_site_group
24
+
25
+ # Create a new site group in project
26
+ #
27
+ # @param project_id [Integer] Id of project
28
+ # @param opts [Hash] options hash of parameters
29
+ # @option opts [String] name The human readable name for the group
30
+ # @option opts [Integer] userId The id of the creating user
31
+ # @option opts [Array] sharedProjectIds The ids of the shared projects
32
+ # @option opts [String] shared The type of sharing for the group
33
+ # @option opts [Array] sites The sites in the group
34
+ # @return [Hashie::Mash] New site group
35
+ def create_site_group project_id, opts={}
36
+ post "projects/#{project_id}/group/site", opts
37
+ end
38
+
39
+ # Update an existing site group in project
40
+ #
41
+ # @param project_id [Integer] Id of project
42
+ # @param site_group_id [Integer] Id of site group
43
+ # @param opts [Hash] options hash of parameter
44
+ # @option opts [Integer] id The id of the group
45
+ # @option opts [String] name The human readable name for the group
46
+ # @option opts [Integer] userId The id of the creating user
47
+ # @option opts [Array] sharedProjectIds The ids of the shared projects
48
+ # @option opts [String] shared The type of sharing for the group
49
+ # @option opts [Array] sites The sites in the group
50
+ # @return [Hashie::Mash] Updated site group
51
+ def update_site_group project_id, site_group_id, opts={}
52
+ put "projects/#{project_id}/group/site/#{site_group_id}", opts
53
+ end
54
+
55
+ # Delete an existing site group project
56
+ #
57
+ # @param project_id [Integer] Id of project
58
+ # @param site_group_id [Integer] Id of site group
59
+ # @return [Hashie::Mash] Deleted site group
60
+ def delete_site_group project_id, site_group_id
61
+ delete "projects/#{project_id}/group/site/#{site_group_id}"
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
data/lib/bwapi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module BWAPI
2
- VERSION = "6.3.0"
2
+ VERSION = "6.4.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.3.0.pre.228
4
+ version: 6.4.0.pre.233
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-19 00:00:00.000000000 Z
11
+ date: 2014-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: 2.13.0
19
+ version: 2.14.1
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: 2.13.0
26
+ version: 2.14.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: colored
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - ~>
88
88
  - !ruby/object:Gem::Version
89
- version: 1.8.2
89
+ version: 1.9.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ~>
95
95
  - !ruby/object:Gem::Version
96
- version: 1.8.2
96
+ version: 1.9.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: netrc
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -164,6 +164,10 @@ files:
164
164
  - lib/bwapi/client/projects/data_download.rb
165
165
  - lib/bwapi/client/projects/demographics.rb
166
166
  - lib/bwapi/client/projects/facebook_queries.rb
167
+ - lib/bwapi/client/projects/group.rb
168
+ - lib/bwapi/client/projects/group/author_group.rb
169
+ - lib/bwapi/client/projects/group/location_group.rb
170
+ - lib/bwapi/client/projects/group/site_group.rb
167
171
  - lib/bwapi/client/projects/queries.rb
168
172
  - lib/bwapi/client/projects/queries/backfill.rb
169
173
  - lib/bwapi/client/projects/queries/date_range.rb