Sha256: 2bc270266ef9c04975acb6cc5102014c60bf527d4b34b053c43194ef4a7caa69

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

DataSift
========

The official Ruby library for accessing the DataSift API. See http://datasift.net for full details and to sign up for an account.

The examples and tests use the username and API key in config.yml.

Install Instructions
--------------------

sudo gem install datasift

Simple example
--------------

This example looks for anything that contains the word "datasift" and simply prints the content to the screen as they come in.

```ruby
require 'rubygems'
require 'datasift'
user = DataSift::User.new("your username", "your api_key")
definition = user.createDefinition('interaction.content contains "football"')
consumer = definition.getConsumer(DataSift::StreamConsumer::TYPE_HTTP)
consumer.consume(true) do |interaction|
	if interaction
		puts interaction['interaction']['content']
	end
end
```

See the DataSift documentation for full details of the data contained within each interaction: http://support.datasift.net/help/kb/rest-api/return-objects

License
-------

All code contained in this repository is Copyright 2011 MediaSift Ltd.

This code is released under the BSD license. Please see the LICENSE file for more details.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
datasift-0.2.0 README.md