Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.

Commit 5c1a395

Browse files
committed
Add streaming example [ci skip]
1 parent ca7413a commit 5c1a395

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.yardopts

+1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ examples/AllTweets.md
1212
examples/Configuration.md
1313
examples/RateLimiting.md
1414
examples/Search.md
15+
examples/Streaming.md
1516
examples/Update.md

examples/Streaming.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Streaming
2+
3+
This example assumes you have a configured Twitter Streaming `client`.
4+
Instructions on how to configure a client can be found in
5+
[examples/Configuration.md][cfg].
6+
7+
[cfg]: https://github.com/sferik/twitter/blob/master/examples/Configuration.md
8+
9+
Here's a simple example of how to stream tweets from San Francisco:
10+
11+
```ruby
12+
client.filter(:locations => "-122.75,36.8,-121.75,37.8") do |tweet|
13+
puts tweet.text
14+
end
15+
```

0 commit comments

Comments
 (0)