bwapi 8.0.0 → 9.0.0.pre.344

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 189ac7a340289c874ea1833db26e72a0757f7e0a
4
- data.tar.gz: 905a7180f4fa09812ff53a4a3b5011400627a670
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZGM1NjAzOGQzYjY3NmJjNDZjMjg1YzIyNGU2ZTkzNjQ5NWQ3MGZmMw==
5
+ data.tar.gz: !binary |-
6
+ NGM2MDU2MjRjMWJkMjlmNDVlMzUyYzUyMDM4NWE1NWU3NmJjOWFmMw==
5
7
  SHA512:
6
- metadata.gz: 9513d25e0e392d34fc89806387033bdad6e4f97d10f9e75678a2d97582c5876f876e64d10cb26ddb134d6bea892594544ff488427a11fffb83c61c799a07a5f2
7
- data.tar.gz: dccf4772dce1807dcbdfb1c2a72e17f1d8f26ad4f623e1c37bf3644c6dc7a32d49096008abeb42c4995f9d5d6ececfacbd7a69fa17a4e2de645f4c9a77488747
8
+ metadata.gz: !binary |-
9
+ MThjODIzYTkwM2U4MGQ5NTE5MWQ5YjU3ZjI2MTRmZGEwZDM1Y2Y0N2FiNDlh
10
+ ZGMwMDQ5YmJiMzVkODZhZWEzMWY1ZjZhZjk1M2VlNjQ4NDQ5ZDFlODFjZGI1
11
+ N2FlNmYxNjcwN2JlYzljZmVkYzE4ZjVlZWYxZWQ2MTQ3NmU3MzU=
12
+ data.tar.gz: !binary |-
13
+ ZWE2MmViNThmMWQxMGViYjkzOGM4NTJjYjdiYTYxMDFiNTczOWM1M2MxNDc5
14
+ YThhNzdkYzM5ZjQ5N2Q2N2Q4MDIxY2RkMDI3OTY3NzU3Njk3MmFmZDE0OWY5
15
+ Y2I0NmFmYWRjYjY1MGY4MzExMTFhMjEyZmI3NDNjODVhYmJhY2I=
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
6
6
  s.name = 'bwapi'
7
7
  s.version = BWAPI::VERSION
8
8
  s.version = BWAPI::VERSION + ".pre.#{ENV['TRAVIS_BUILD_NUMBER']}" if ENV['TRAVIS']
9
- s.date = '2014-05-07'
9
+ s.date = '2014-05-28'
10
10
  s.summary = 'Brandwatch API Wrapper'
11
11
  s.description = 'A Ruby wrapper for the Brandwatch API'
12
12
  s.author = 'Jonathan Chrisp'
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+ require 'bwapi/client/projects/data/mentions/notes'
2
3
 
3
4
  module BWAPI
4
5
  class Client
@@ -60,6 +61,8 @@ module BWAPI
60
61
  def data_mentions_tweets(project_id, opts = {})
61
62
  get "projects/#{project_id}/data/mentions/tweets", opts
62
63
  end
64
+
65
+ include BWAPI::Client::Projects::Data::Mentions::Notes
63
66
  end
64
67
  end
65
68
  end
@@ -0,0 +1,63 @@
1
+ # encoding: utf-8
2
+
3
+ module BWAPI
4
+ class Client
5
+ module Projects
6
+ module Data
7
+ module Mentions
8
+ # Notes module for data/mentions/#{resource_id}/notes endpoints
9
+ module Notes
10
+ # Post a new note for a mention
11
+ #
12
+ # @param project_id [Integer] Id of project
13
+ # @param resource_id [Integer] Id of mention
14
+ # @param opts [Hash] options hash of parameters
15
+ # @option opts [Integer] project_id the id of the project the mention is in
16
+ # @option opts [Integer] resource_id the id of the mention
17
+ # @option opts [String] text the text of the note
18
+ # @return [Hashie::Mash] the new note
19
+ def create_mention_note(project_id, resource_id, opts = {})
20
+ post "projects/#{project_id}/data/mentions/#{resource_id}/notes", opts
21
+ end
22
+
23
+ # Get a note for a mention
24
+ #
25
+ # @param project_id [Integer] Id of project
26
+ # @param resource_id [Integer] Id of mention
27
+ # @param note_id [Integer] Id of the note
28
+ # @return [Hashie::Mash] the selected note
29
+ def mention_note(project_id, resource_id, note_id)
30
+ get "projects/#{project_id}/data/mentions/#{resource_id}/notes/#{note_id}", opts
31
+ end
32
+
33
+ # Put an existing note for a mention
34
+ #
35
+ # @param project_id [Integer] Id of project
36
+ # @param resource_id [Integer] Id of mention
37
+ # @param note_id [Integer] Id of the note
38
+ # @param opts [Hash] options hash of parameters
39
+ # @option opts [Integer] project_id the id of the project the mention is in
40
+ # @option opts [Integer] resource_id the id of the mention
41
+ # @option opts [String] text the text of the note
42
+ # @return [Hashie::Mash] the edited note
43
+ def update_mention_note(project_id, resource_id, note_id, opts = {})
44
+ put "projects/#{project_id}/data/mentions/#{resource_id}/notes/#{note_id}", opts
45
+ end
46
+
47
+ # Patch an existing note for a mention
48
+ #
49
+ # @param project_id [Integer] Id of project
50
+ # @param resource_id [Integer] Id of mention
51
+ # @param note_id [Integer] Id of the note
52
+ # @param opts [Hash] options hash of parameters
53
+ # @option opts [String] prependNote the text of the note
54
+ # @return [Hashie::Mash] the patched note
55
+ def patch_mention_note(project_id, resource_id, note_id, opts = {})
56
+ patch "projects/#{project_id}/data/mentions/#{resource_id}/notes/#{note_id}", opts
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
@@ -5,31 +5,51 @@ module BWAPI
5
5
  module User
6
6
  # Notifications module for projects/notifications endpoints
7
7
  module Notifications
8
+ # Post a new user notification
9
+ #
10
+ # @param opts [Hash] options hash of parameters
11
+ # @option opts [Boolean] hidden if the notification is hidden from users
12
+ # @option opts [Boolean] read if the notification has been read
13
+ # @option opts [String] body the body text of the notification
14
+ # @option opts [String] subject the subject text of the notification
15
+ # @option opts [String] type the type of notification
16
+ # @return [Hashie::Mash] new user notification
17
+ def create_notification(opts = {})
18
+ post 'user/notifications', opts
19
+ end
20
+
8
21
  # Get the current user notifications
9
22
  #
10
23
  # @param opts [Hash] options hash of parameters
11
24
  # @option opts [Integer] page Page of projects to retrieve
12
25
  # @option opts [Integer] pageSize Results per page of results
13
- # @return [Hashie::Mash] User notifications
26
+ # @return [Hashie::Mash] user notifications
14
27
  def notifications(opts = {})
15
28
  get 'user/notifications', opts
16
29
  end
17
30
 
18
- # Update users existing notifications
31
+ # Update users existing notification
19
32
  #
20
- # @param opts [Hash] options Hash of parameters
21
- # @option opts [Array] list User notifications to be edited
22
- # @return [Hashie::Mash] Updated user notifications
23
- def update_notification(opts = {})
24
- put 'user/notifications', opts
33
+ # @param notification_id [Integer] Id of notification
34
+ # @param opts [Hash] options hash of parameters
35
+ # @option opts [Boolean] hidden if the notification is hidden from users
36
+ # @option opts [Boolean] read if the notification has been read
37
+ # @option opts [String] body the body text of the notification
38
+ # @option opts [String] subject the subject text of the notification
39
+ # @option opts [String] type the type of notification
40
+ # @return [Hashie::Mash] edited user notification
41
+ def update_notification(notification_id, opts = {})
42
+ put "user/notifications/#{notification_id}", opts
25
43
  end
26
44
 
27
- # Delete a users existing notification
45
+ # Patch a users existing notification
28
46
  #
29
47
  # @param notification_id [Integer] Id of notification
30
- # @return [Hashie::Mash] Deleted user notifications
31
- def delete_notification(notification_id)
32
- delete "user/notifications/#{notification_id}"
48
+ # @param opts [Hash] options Hash of parameters
49
+ # @option opts [Boolean] read if the notification has been read
50
+ # @return [Hashie::Mash] patched user notifications
51
+ def patch_notification(notification_id, opts = {})
52
+ patch "user/notifications/#{notification_id}", opts
33
53
  end
34
54
  end
35
55
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  # BWAPI Version
4
4
  module BWAPI
5
- VERSION = '8.0.0'
5
+ VERSION = '9.0.0'
6
6
  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: 8.0.0
4
+ version: 9.0.0.pre.344
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-05-07 00:00:00.000000000 Z
11
+ date: 2014-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -17,7 +17,7 @@ dependencies:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: 2.14.1
20
- - - '>='
20
+ - - ! '>='
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.14.1
23
23
  type: :development
@@ -27,7 +27,7 @@ dependencies:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
29
  version: 2.14.1
30
- - - '>='
30
+ - - ! '>='
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.14.1
33
33
  - !ruby/object:Gem::Dependency
@@ -37,7 +37,7 @@ dependencies:
37
37
  - - ~>
38
38
  - !ruby/object:Gem::Version
39
39
  version: 0.21.0
40
- - - '>='
40
+ - - ! '>='
41
41
  - !ruby/object:Gem::Version
42
42
  version: 0.21.0
43
43
  type: :development
@@ -47,7 +47,7 @@ dependencies:
47
47
  - - ~>
48
48
  - !ruby/object:Gem::Version
49
49
  version: 0.21.0
50
- - - '>='
50
+ - - ! '>='
51
51
  - !ruby/object:Gem::Version
52
52
  version: 0.21.0
53
53
  - !ruby/object:Gem::Dependency
@@ -71,7 +71,7 @@ dependencies:
71
71
  - - ~>
72
72
  - !ruby/object:Gem::Version
73
73
  version: 0.9.0
74
- - - '>='
74
+ - - ! '>='
75
75
  - !ruby/object:Gem::Version
76
76
  version: 0.9.0
77
77
  type: :runtime
@@ -81,7 +81,7 @@ dependencies:
81
81
  - - ~>
82
82
  - !ruby/object:Gem::Version
83
83
  version: 0.9.0
84
- - - '>='
84
+ - - ! '>='
85
85
  - !ruby/object:Gem::Version
86
86
  version: 0.9.0
87
87
  - !ruby/object:Gem::Dependency
@@ -91,7 +91,7 @@ dependencies:
91
91
  - - ~>
92
92
  - !ruby/object:Gem::Version
93
93
  version: 0.9.0
94
- - - '>='
94
+ - - ! '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: 0.9.0
97
97
  type: :runtime
@@ -101,7 +101,7 @@ dependencies:
101
101
  - - ~>
102
102
  - !ruby/object:Gem::Version
103
103
  version: 0.9.0
104
- - - '>='
104
+ - - ! '>='
105
105
  - !ruby/object:Gem::Version
106
106
  version: 0.9.0
107
107
  - !ruby/object:Gem::Dependency
@@ -111,7 +111,7 @@ dependencies:
111
111
  - - ~>
112
112
  - !ruby/object:Gem::Version
113
113
  version: 2.1.1
114
- - - '>='
114
+ - - ! '>='
115
115
  - !ruby/object:Gem::Version
116
116
  version: 2.1.1
117
117
  type: :runtime
@@ -121,7 +121,7 @@ dependencies:
121
121
  - - ~>
122
122
  - !ruby/object:Gem::Version
123
123
  version: 2.1.1
124
- - - '>='
124
+ - - ! '>='
125
125
  - !ruby/object:Gem::Version
126
126
  version: 2.1.1
127
127
  - !ruby/object:Gem::Dependency
@@ -131,7 +131,7 @@ dependencies:
131
131
  - - ~>
132
132
  - !ruby/object:Gem::Version
133
133
  version: 0.7.7
134
- - - '>='
134
+ - - ! '>='
135
135
  - !ruby/object:Gem::Version
136
136
  version: 0.7.7
137
137
  type: :runtime
@@ -141,7 +141,7 @@ dependencies:
141
141
  - - ~>
142
142
  - !ruby/object:Gem::Version
143
143
  version: 0.7.7
144
- - - '>='
144
+ - - ! '>='
145
145
  - !ruby/object:Gem::Version
146
146
  version: 0.7.7
147
147
  description: A Ruby wrapper for the Brandwatch API
@@ -203,6 +203,7 @@ files:
203
203
  - lib/bwapi/client/projects/categories/copy.rb
204
204
  - lib/bwapi/client/projects/data.rb
205
205
  - lib/bwapi/client/projects/data/mentions.rb
206
+ - lib/bwapi/client/projects/data/mentions/notes.rb
206
207
  - lib/bwapi/client/projects/data/volume.rb
207
208
  - lib/bwapi/client/projects/data_download.rb
208
209
  - lib/bwapi/client/projects/demographics.rb
@@ -254,14 +255,14 @@ require_paths:
254
255
  - lib
255
256
  required_ruby_version: !ruby/object:Gem::Requirement
256
257
  requirements:
257
- - - '>='
258
+ - - ! '>='
258
259
  - !ruby/object:Gem::Version
259
260
  version: 1.9.2
260
261
  required_rubygems_version: !ruby/object:Gem::Requirement
261
262
  requirements:
262
- - - '>='
263
+ - - ! '>'
263
264
  - !ruby/object:Gem::Version
264
- version: '0'
265
+ version: 1.3.1
265
266
  requirements: []
266
267
  rubyforge_project:
267
268
  rubygems_version: 2.2.2
@@ -274,4 +275,3 @@ test_files:
274
275
  - spec/bwapi_spec.rb
275
276
  - spec/fixtures/.netrc
276
277
  - spec/helper.rb
277
- has_rdoc: