datasift 3.0.1 → 3.1.0

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,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c2bb78e62ace97454498af2197fd5596ed1179d
4
- data.tar.gz: 043551cbb82f3be760278c7a73717f62b09e3fd5
3
+ metadata.gz: dac333f752e67d6791b6bc3936553e01ab09f2c6
4
+ data.tar.gz: 7f02d47c1cb8103e1f7315a10365c21c512e8521
5
5
  SHA512:
6
- metadata.gz: 2b5e6674b3b30aa02297709ba394622d4d5973cac56eb0f4227ebed2146b669e785950cd90d387ab54e5014346247894defbfcb9e60050cdaadf0a43c79f3fd9
7
- data.tar.gz: 87576ec2b9220c393ed443836c0fbaaf788ac25ecd92dc27214e95c5c313a421b4e4155cd0247f70f78a961dd1d3500dffc169f4eab6ddfccce526d83d2d388b
6
+ metadata.gz: 2cbf887afc303ce2f470d1beaa3adf92f010b46b9abc58025769ca5828acf542efdf85e343a0b51af39a62fca73e6637a6403f2a43322c3a3a756b2e27ba3933
7
+ data.tar.gz: 0033b783f9dc01b1f846be11fbb751c335274bd896198584c9b900fa338d9b5e07fd85686eee90404fc61749f49f54431cbe070d402213ae7b547a0356c6b4d6
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0.0
4
+ - 2.1.2
data/CHANGELOG.md CHANGED
@@ -1,6 +1,19 @@
1
1
  CHANGELOG
2
2
  ================================
3
3
 
4
+ v.3.1.0 (2014-07-30)
5
+ --------------------
6
+
7
+ ####New Feature
8
+ Added support for four new Managed Sources API endpoints to improve usability of the Managed Sources API, and make it easier to add or remove resources or authentication tokens
9
+ * /source/auth/add
10
+ * /source/auth/remove
11
+ * /source/resource/add
12
+ * /source/resource/remove
13
+
14
+ ####Improvements
15
+ Ensure all POST and PUT API requests are sent JSON encoded with correct headers
16
+
4
17
  v.3.0.1 (2014-07-17)
5
18
  --------------------
6
19
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.1
1
+ 3.1.0
data/datasift.gemspec CHANGED
@@ -15,10 +15,12 @@ Gem::Specification.new do |s|
15
15
  s.add_runtime_dependency('multi_json', '~> 1.8.0')
16
16
  s.add_runtime_dependency('websocket-td', '~> 0.0.4')
17
17
 
18
- s.add_development_dependency('rdoc', '> 0')
18
+ s.add_development_dependency('rdoc', '~> 0')
19
19
  s.add_development_dependency('webmock', '~> 1.17.1')
20
20
  s.add_development_dependency('shoulda', '~> 2.11.3')
21
21
  s.add_development_dependency('minitest', '~> 5.0')
22
+ s.add_development_dependency('rake', '~> 0')
23
+ s.add_development_dependency('simplecov', '~> 0')
22
24
 
23
25
  s.files = `git ls-files`.split("\n")
24
26
  s.test_files = `git ls-files -- {test}/*`.split("\n")
@@ -8,25 +8,23 @@ class ManagedSourceApi < DataSiftExample
8
8
  def run
9
9
  begin
10
10
  puts 'Creating a managed source'
11
- parameters = {:likes => true,
12
- :posts_by_others => true,
13
- :comments => true,
14
- :page_likes => true
11
+ parameters = {
12
+ :likes => true,
13
+ :comments => true
15
14
  }
16
- resources = [{
17
- :parameters => {
18
- :url => 'http://www.facebook.com/theguardian',
19
- :title => 'Some news page',
20
- :id => :theguardian
21
- }
22
- }]
23
- auth = [{
24
- :parameters => {
25
- :value => 'CAAIUKbXn8xsBAN5MnINICUT9gEBsZBh3hKoSEeIMP0ZA4zadMr64X6ljvZC4VBZCyYr9tyhih5nO0R39A1FQ848v0mZA6d3ehIHuSbKb7avtfLOtL5XKDYRIXHmRWreyxxVc3jk7CIa4ZCI5AAKeUUO3GUS8EaPdYVh9rO5FvvNmIatzz6k8el'
26
- }
27
- }]
28
-
29
- source = @datasift.managed_source.create('facebook_page', 'My managed source', parameters, resources, auth)
15
+ resources = [{
16
+ :parameters => {
17
+ :type => 'user',
18
+ :value => 25025320
19
+ }
20
+ }]
21
+ auth = [{
22
+ :parameters => {
23
+ :value => '10942122.00a3229.fff654d524854054bdb0288a05cdbdd1'
24
+ }
25
+ }]
26
+
27
+ source = @datasift.managed_source.create('instagram', 'Ruby test', parameters, resources, auth)
30
28
  puts source
31
29
 
32
30
  id = source[:data][:id]
@@ -34,10 +32,68 @@ class ManagedSourceApi < DataSiftExample
34
32
  puts "\nStarting delivery for my Managed Source"
35
33
  puts @datasift.managed_source.start id
36
34
 
37
- puts "\nUpdating"
38
- puts @datasift.managed_source.update(id, 'facebook_page', 'Updated source', parameters, resources, auth)
35
+ # Define new resources to be added
36
+ update_resources = [{
37
+ :parameters => {
38
+ :type => 'user',
39
+ :value => 8139971
40
+ }
41
+ }]
42
+
43
+ # Push each of the existing resources back into the new resources array
44
+ source[:data][:resources].each do |resource|
45
+ update_resources.push(resource)
46
+ end
47
+
48
+ puts "\nUpdating; adding a new resource, and changing the name"
49
+ puts @datasift.managed_source.update(id, 'instagram', 'Updated Ruby test', source[:data][:parameters], update_resources, source[:data][:auth])
50
+
51
+ puts "\nGetting info from DataSift about my source"
52
+ puts @datasift.managed_source.get id
53
+
54
+ # Define new resources to add to Managed Source
55
+ new_resources = [{
56
+ :parameters => {
57
+ :type => "tag",
58
+ :value => "sun"
59
+ }
60
+ },
61
+ {
62
+ :parameters => {
63
+ :type => "tag",
64
+ :value => "sea"
65
+ }
66
+ },
67
+ {
68
+ :parameters => {
69
+ :type => "tag",
70
+ :value => "surf"
71
+ }
72
+ }]
73
+
74
+ new_auth = [{
75
+ :parameters => {
76
+ :value => '10942111.1f2134f.8837abb205b44ece801022f6fa989cc4'
77
+ }
78
+ }]
79
+
80
+ puts "\nAdding a new resource to my source (as an array of Ruby objects)"
81
+ puts @datasift.managed_source_resource.add(id, new_resources)
82
+
83
+ puts "\nAdding a new auth token to my source (as an array of Ruby objects)"
84
+ puts @datasift.managed_source_auth.add(id, new_auth)
85
+
86
+ puts "\nGetting info from DataSift about my source (notice the new resources and tokens have been added)"
87
+ source = @datasift.managed_source.get id
88
+ puts source
89
+
90
+ puts "\nRemoving a resource from my source by resource_id"
91
+ puts @datasift.managed_source_resource.remove(id, [source[:data][:resources][0][:resource_id]])
92
+
93
+ puts "\nRemoving an auth token from my source by identity_id"
94
+ puts @datasift.managed_source_auth.remove(id, [source[:data][:auth][0][:identity_id]])
39
95
 
40
- puts "\nGetting info from DataSift about my page"
96
+ puts "\nGetting info from DataSift about my source (notice an auth token and resource have been removed)"
41
97
  puts @datasift.managed_source.get id
42
98
 
43
99
  puts "\nFetching logs"
@@ -0,0 +1,263 @@
1
+ require 'yajl/json_gem'
2
+ ### Usage ###
3
+ # user = DataSift::User.new(config['username'], config['api_key'])
4
+ # user.createManagedSource(:token => "CAAIUKbXn8xsBAILlxGCZADEZAM87tRqJXo9OqWskCs6jej3wfQ1LRRZAgHJQEZCHU0ABBXDwiq9o7D4uytC5LpsAcx7oiDusagsJiKtmPaZBeMkuGh4jYt1zsXo4EQuZCWPcZAIdQQLZBtjTpQlbbAZCTuJ4SSrlmOPQZD", :source_type => "facebook_page", :name => "test", :parameters=> {:likes => true, :posts_by_others => true, :comments => true}, :resources => [{ :url => "http://www.facebook.com/theguardian", :title => "The Guardian", :id => 10513336322 } ] )
5
+
6
+ module DataSift
7
+ #The ManagedSource class represents a ManagedSource query.
8
+ class ManagedSource
9
+ #The ID of this Managed Source
10
+ attr_reader :managed_source_id
11
+ #The Managed Source type
12
+ attr_reader :source_type
13
+ #The current status of this Managed Source.
14
+ attr_reader :status
15
+ #The title for this Managed Source.
16
+ attr_reader :name
17
+ #The date/time when this Managed Source was created.
18
+ attr_reader :created_at
19
+ #The Managed Source source_type
20
+ attr_reader :source_type
21
+ #The Managed Source parameters
22
+ attr_reader :parameters
23
+ #The Managed Source resources
24
+ attr_reader :resources
25
+ #The Managed Source token
26
+ attr_reader :token
27
+ #The Managed Source auth
28
+ attr_reader :auth
29
+ #Api raw response
30
+ attr_reader :raw_attributes
31
+
32
+ #Constructor. Pass all parameters to create a new Managed Source, or provide a User object and a managed_source_id to load an existing Managed Source from the API.
33
+ #=== Parameters
34
+ #* +user+ - The DataSift::User object.
35
+ def initialize(user, hash)
36
+ raise InvalidDataError, 'Please supply a valid User object when creating a Managed Source object.' unless user.is_a? DataSift::User
37
+ @user = user
38
+
39
+ if hash.kind_of?(Hash)
40
+ if hash.has_key?('id')
41
+ # Initialising from an array
42
+ @managed_source_id = hash['id']
43
+ initFromArray(hash)
44
+ else
45
+ @source_type = hash[:source_type]
46
+ @name = hash[:name]
47
+ @parameters = hash[:parameters]
48
+ @resources = hash[:resources]
49
+ @auth = hash[:auth]
50
+ end
51
+ else
52
+ # Fetching from the API
53
+ @managed_source_id = hash
54
+ reloadData()
55
+ end
56
+ end
57
+
58
+ #Get a single Managed Source by ID.
59
+ #=== Parameters
60
+ #* +id+ - The Managed Source ID.
61
+ #=== Returns
62
+ #A ManagedSource object
63
+ def self.get(user, managed_source_id)
64
+ return new(user, user.callAPI('source/get', { 'id' => managed_source_id }))
65
+ end
66
+
67
+ def self.list(user, page = 1, per_page = 20, source_type = '')
68
+ begin
69
+ res = user.callAPI(
70
+ 'source/get', {
71
+ 'page' => page,
72
+ 'per_page' => per_page,
73
+ 'source_type' => source_type
74
+ })
75
+ retval = { 'count' => res['count'], 'managed_sources' => [] }
76
+ for source in res['sources']
77
+ retval['managed_sources'].push(new(user, source))
78
+ end
79
+ retval
80
+ rescue APIError => err
81
+ case err.http_code
82
+ when 400
83
+ #Missing or invalid parameters
84
+ raise InvalidDataError, err
85
+ else
86
+ raise APIError.new(err.http_code), 'Unexpected APIError code: ' + err.http_code.to_s + ' [' + err.message + ']'
87
+ end
88
+ end
89
+ end
90
+
91
+ #Call the DataSift API to create the Managed Source
92
+ def create()
93
+ raise InvalidDataError, 'This Managed Source has already been created' unless not @managed_source_id
94
+
95
+ begin
96
+ res = @user.callAPI(
97
+ 'source/create', {
98
+ 'source_type' => @source_type,
99
+ 'name' => @name,
100
+ 'parameters' => @parameters.to_json,
101
+ 'resources' => @resources.to_json,
102
+ 'auth' => @auth.to_json
103
+ })
104
+ raise InvalidDataError, 'Prepared successfully but no managed_source_id ID in the response' unless res.has_key?('id')
105
+ @managed_source_id = res['id']
106
+
107
+ rescue APIError => err
108
+ case err.http_code
109
+ when 400
110
+ raise InvalidDataError, err
111
+ else
112
+ raise APIError.new(err.http_code), 'Unexpected APIError code: ' + err.http_code.to_s + ' [' + err.message + ']'
113
+ end
114
+ end
115
+
116
+ # Reload the data so we get the created_at date, initial status and the rest.
117
+ reloadData()
118
+ end
119
+
120
+ #Reload the data for this object from the API.
121
+ def reloadData()
122
+ #Can't do this without a playback ID
123
+ raise InvalidDataError, 'Cannot reload the data with a Managed Source with no Managed Source ID' unless @managed_source_id
124
+
125
+ begin
126
+ initFromArray(@user.callAPI('source/get', { 'id' => @managed_source_id }))
127
+ rescue APIError => err
128
+ case err.http_code
129
+ when 400
130
+ raise InvalidDataError, err
131
+ else
132
+ raise APIError.new(err.http_code), 'Unexpected APIError code: ' + err.http_code.to_s + ' [' + err.message + ']'
133
+ end
134
+ end
135
+ end
136
+
137
+ #Initialise this object from the data in a Hash.
138
+ #=== Parameters
139
+ #* +data+ - The Hash containing the data.
140
+ def initFromArray(data)
141
+ raise APIError, 'No managed source ID in the response' unless data.has_key?('id')
142
+ raise APIError, 'Incorrect managed source ID in the response' unless not @managed_source_id or data['id'] == @managed_source_id
143
+ @managed_source_id = data['id']
144
+
145
+ raise APIError, 'No name in the response' unless data.has_key?('name')
146
+ @name = data['name']
147
+
148
+ raise APIError, 'No auth in the response' unless data.has_key?('auth')
149
+ @auth = data['auth']
150
+
151
+ raise APIError, 'No created at timstamp in the response' unless data.has_key?('created_at')
152
+ @created_at = DateTime.strptime(String(data['created_at']), '%s')
153
+
154
+ raise APIError, 'No status in the response' unless data.has_key?('status')
155
+ @status = data['status']
156
+
157
+ raise APIError, 'No source_type in the response' unless data.has_key?('source_type')
158
+ @source_type = data['source_type']
159
+
160
+ raise APIError, 'No parameters in the response' unless data.has_key?('parameters')
161
+ @parameters = data['parameters']
162
+
163
+ raise APIError, 'No resources in the response' unless data.has_key?('resources')
164
+ @resources = data['resources']
165
+
166
+ @raw_attributes = data
167
+
168
+ return true
169
+ end
170
+
171
+ #Start this Managed Source query.
172
+ def start()
173
+ raise InvalidDataError, 'Cannot start a Managed souce query that hasn\'t been created' unless @managed_source_id
174
+
175
+ begin
176
+ res = @user.callAPI('source/start', { 'id' => @managed_source_id })
177
+ rescue APIError => err
178
+ case err.http_code
179
+ when 400
180
+ # Missing or invalid parameters
181
+ raise InvalidDataError, err
182
+ when 404
183
+ # Managed Source not found
184
+ raise InvalidDataError, err
185
+ else
186
+ raise APIError.new(err.http_code), 'Unexpected APIError code: ' + err.http_code.to_s + ' [' + err.message + ']'
187
+ end
188
+ end
189
+ end
190
+
191
+ #Stop this Managed Source
192
+ def stop()
193
+ raise InvalidDataError, 'Cannot stop a Managed Source query that hasn\'t been prepared' unless @managed_source_id
194
+
195
+ begin
196
+ res = @user.callAPI('source/stop', { 'id' => @managed_source_id })
197
+ rescue APIError => err
198
+ case err.http_code
199
+ when 400
200
+ # Missing or invalid parameters
201
+ raise InvalidDataError, err
202
+ when 404
203
+ # Managed Source not found
204
+ raise InvalidDataError, err
205
+ else
206
+ raise APIError.new(err.http_code), 'Unexpected APIError code: ' + err.http_code.to_s + ' [' + err.message + ']'
207
+ end
208
+ end
209
+ end
210
+
211
+ #Delete this Managed Source
212
+ def delete()
213
+ raise InvalidDataError, 'Cannot delete a Managed source query that hasn\'t been prepared' unless @managed_source_id
214
+
215
+ begin
216
+ @user.callAPI('source/delete', { 'id' => @managed_source_id })
217
+ rescue APIError => err
218
+ case err.http_code
219
+ when 400
220
+ # Missing or invalid parameters
221
+ raise InvalidDataError, err
222
+ when 404
223
+ # Managed Source not found
224
+ raise InvalidDataError, err
225
+ else
226
+ raise APIError.new(err.http_code), 'Unexpected APIError code: ' + err.http_code.to_s + ' [' + err.message + ']'
227
+ end
228
+ end
229
+ end
230
+
231
+ #Page through recent Managed Sources log entries
232
+ #=== Parameters
233
+ #* +page+ - The page number to get.
234
+ #* +per_page+ - The number of items per page.
235
+ #=== Returns
236
+ #A Hash containing...
237
+ #* +count+ - The total number of matching log entries.
238
+ #* +log_entries+ - An array of Hashes where each Hash is a log entry.
239
+ def getLogs(page = 1, per_page = 20)
240
+ begin
241
+ raise InvalidDataError, 'The specified page number is invalid' unless page >= 1
242
+ raise InvalidDataError, 'The specified per_page value is invalid' unless per_page >= 1
243
+
244
+ params = {
245
+ 'id' => @managed_source_id,
246
+ 'page' => page,
247
+ 'per_page' => per_page
248
+ }
249
+
250
+ return @user.callAPI('source/log', params)
251
+ rescue APIError => err
252
+ case err.http_code
253
+ when 400
254
+ # Missing or invalid parameters
255
+ raise InvalidDataError, err
256
+ else
257
+ raise APIError.new(err.http_code), 'Unexpected APIError code: ' + err.http_code.to_s + ' [' + err.message + ']'
258
+ end
259
+ end
260
+ end
261
+
262
+ end
263
+ end
data/lib/datasift.rb CHANGED
@@ -12,6 +12,8 @@ require dir + '/push'
12
12
  require dir + '/historics'
13
13
  require dir + '/historics_preview'
14
14
  require dir + '/managed_source'
15
+ require dir + '/managed_source_auth'
16
+ require dir + '/managed_source_resource'
15
17
  require dir + '/live_stream'
16
18
  require dir + '/dynamic_list'
17
19
  require dir + '/dynamic_list_replace'
@@ -52,19 +54,23 @@ module DataSift
52
54
  raise InvalidConfigError.new ('Config cannot be nil')
53
55
  end
54
56
  if config.key?(:api_key) == false || config.key?(:username) == false
55
- raise InvalidConfigError.new('A valid username and API key are required')
57
+ raise InvalidConfigError.new('A valid username and API key are required. ' +
58
+ 'You can check your API credentials at https://datasift.com/settings')
56
59
  end
57
60
 
58
- @config = config
59
- @historics = DataSift::Historics.new(config)
60
- @push = DataSift::Push.new(config)
61
- @managed_source = DataSift::ManagedSource.new(config)
62
- @historics_preview = DataSift::HistoricsPreview.new(config)
63
- @dynamic_list = DataSift::DynamicList.new(config)
64
- @dynamic_list_replace = DataSift::DynamicListReplace.new(config)
61
+ @config = config
62
+ @historics = DataSift::Historics.new(config)
63
+ @push = DataSift::Push.new(config)
64
+ @managed_source = DataSift::ManagedSource.new(config)
65
+ @managed_source_resource = DataSift::ManagedSourceResource.new(config)
66
+ @managed_source_auth = DataSift::ManagedSourceAuth.new(config)
67
+ @historics_preview = DataSift::HistoricsPreview.new(config)
68
+ @dynamic_list = DataSift::DynamicList.new(config)
69
+ @dynamic_list_replace = DataSift::DynamicListReplace.new(config)
65
70
  end
66
71
 
67
- attr_reader :historics, :push, :managed_source, :historics_preview, :dynamic_list, :dynamic_list_replace
72
+ attr_reader :historics, :push, :managed_source, :managed_source_resource, :managed_source_auth,
73
+ :historics_preview, :dynamic_list, :dynamic_list_replace
68
74
 
69
75
  ##
70
76
  # Checks if the syntax of the given CSDL is valid
@@ -126,13 +132,6 @@ module DataSift
126
132
  validate config
127
133
  options = {}
128
134
  url = build_url(path, config)
129
- case method.to_s.downcase.to_sym
130
- when :get, :head, :delete
131
- url += "#{URI.parse(url).query ? '&' : '?'}#{encode params}"
132
- payload = nil
133
- else
134
- payload = encode params
135
- end
136
135
 
137
136
  headers.update ({
138
137
  :user_agent => "DataSift/#{config[:api_version]} Ruby/v#{VERSION}",
@@ -140,6 +139,16 @@ module DataSift
140
139
  :content_type => 'application/x-www-form-urlencoded'
141
140
  })
142
141
 
142
+ case method.to_s.downcase.to_sym
143
+ when :get, :head, :delete
144
+ url += "#{URI.parse(url).query ? '&' : '?'}#{encode params}"
145
+ payload = nil
146
+ else
147
+ #payload = encode params
148
+ payload = MultiJson.dump(params)
149
+ headers.update ({ :content_type => 'application/json' })
150
+ end
151
+
143
152
  options.update(
144
153
  :headers => headers,
145
154
  :method => method,
@@ -0,0 +1,20 @@
1
+ module DataSift
2
+ class ManagedSourceAuth < DataSift::ApiResource
3
+
4
+ def add(id, auth, validate = 'true')
5
+ params = {
6
+ id: id,
7
+ validate: validate
8
+ }
9
+ params.merge!({:auth => auth})
10
+ DataSift.request(:PUT, 'source/auth/add', @config, params)
11
+ end
12
+
13
+ def remove(id, auth_ids)
14
+ params = {id: id}
15
+ params.merge!({:auth_ids => auth_ids})
16
+ DataSift.request(:PUT, 'source/auth/remove', @config, params)
17
+ end
18
+
19
+ end
20
+ end
@@ -0,0 +1,20 @@
1
+ module DataSift
2
+ class ManagedSourceResource < DataSift::ApiResource
3
+
4
+ def add(id, resources, validate = 'true')
5
+ params = {
6
+ id: id,
7
+ validate: validate
8
+ }
9
+ params.merge!({:resources => resources})
10
+ DataSift.request(:PUT, 'source/resource/add', @config, params)
11
+ end
12
+
13
+ def remove(id, resource_ids)
14
+ params = {id: id}
15
+ params.merge!({:resource_ids => resource_ids})
16
+ DataSift.request(:PUT, 'source/resource/remove', @config, params)
17
+ end
18
+
19
+ end
20
+ end
@@ -1 +1 @@
1
- {"start":"Wed, 21 May 2014 10:00:00 +0000","end":"Wed, 21 May 2014 11:00:00 +0000","streams":{"028eaeff74f186a768cc37107378fb9d":{"licenses":{"gender":2255,"interaction":2753,"klout.score":2155,"language":2677,"links":2723,"salience.sentiment":2663,"trends":44,"twitter":2753},"seconds":3600},"0fc46cdc3afbeb7c903ba5cb2ae73781":{"licenses":[],"seconds":3600},"1561e183f191f9aa0e55cda127a1e80d":{"licenses":[],"seconds":300},"49ab3b3aadf32fb81624ae69b4fa6646":{"licenses":{"facebook_page":1,"gender":1,"instagram":1,"interaction":1,"language":1,"salience.sentiment":1},"seconds":3600},"828dd0f10a8f7d0201c54684390d059d":{"licenses":[],"seconds":3600},"9dbf78769d088c868836a5d4861b9e7a":{"licenses":[],"seconds":300}}
1
+ {"start":"Wed, 21 May 2014 10:00:00 +0000","end":"Wed, 21 May 2014 11:00:00 +0000","streams":{"028eaeff74f186a768cc37107378fb9d":{"licenses":{"gender":2255,"interaction":2753,"klout.score":2155,"language":2677,"links":2723,"salience.sentiment":2663,"trends":44,"twitter":2753},"seconds":3600},"0fc46cdc3afbeb7c903ba5cb2ae73781":{"licenses":[],"seconds":3600},"1561e183f191f9aa0e55cda127a1e80d":{"licenses":[],"seconds":300},"49ab3b3aadf32fb81624ae69b4fa6646":{"licenses":{"facebook_page":1,"gender":1,"instagram":1,"interaction":1,"language":1,"salience.sentiment":1},"seconds":3600},"828dd0f10a8f7d0201c54684390d059d":{"licenses":[],"seconds":3600},"9dbf78769d088c868836a5d4861b9e7a":{"licenses":[],"seconds":300}}}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datasift
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - DataSift
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-17 00:00:00.000000000 Z
11
+ date: 2014-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -56,14 +56,14 @@ dependencies:
56
56
  name: rdoc
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">"
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">"
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
@@ -108,6 +108,34 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '5.0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rake
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: simplecov
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
111
139
  description: The official Ruby library for accessing the DataSift API. See http://datasift.com/
112
140
  for full details and to sign up for an account.
113
141
  email:
@@ -117,6 +145,7 @@ extensions: []
117
145
  extra_rdoc_files: []
118
146
  files:
119
147
  - ".gitignore"
148
+ - ".travis.yml"
120
149
  - CHANGELOG.md
121
150
  - Gemfile
122
151
  - LICENSE
@@ -136,6 +165,7 @@ files:
136
165
  - examples/managed_source_eg.rb
137
166
  - examples/pull.rb
138
167
  - examples/push_eg.rb
168
+ - lib/DataSift/managed_source.rb
139
169
  - lib/api/api_resource.rb
140
170
  - lib/cli.rb
141
171
  - lib/datasift.rb
@@ -146,6 +176,8 @@ files:
146
176
  - lib/historics_preview.rb
147
177
  - lib/live_stream.rb
148
178
  - lib/managed_source.rb
179
+ - lib/managed_source_auth.rb
180
+ - lib/managed_source_resource.rb
149
181
  - lib/push.rb
150
182
  - test/datasift/core_api_test.rb
151
183
  - test/datasift/historics_preview_api_test.rb