File: Streaming.md

package info (click to toggle)
ruby-twitter 7.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,856 kB
  • sloc: ruby: 10,919; makefile: 6
file content (15 lines) | stat: -rw-r--r-- 425 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Streaming

This example assumes you have a configured Twitter Streaming `client`.
Instructions on how to configure a client can be found in
[examples/Configuration.md][cfg].

[cfg]: https://github.com/sferik/twitter/blob/master/examples/Configuration.md

Here's a simple example of how to stream tweets from San Francisco:

```ruby
client.filter(locations: "-122.75,36.8,-121.75,37.8") do |tweet|
  puts tweet.text
end
```