https://github.com/gedex/go-twitterstream
Go library for accessing Twitter's Stream API
https://github.com/gedex/go-twitterstream
Last synced: 10 months ago
JSON representation
Go library for accessing Twitter's Stream API
- Host: GitHub
- URL: https://github.com/gedex/go-twitterstream
- Owner: gedex
- License: bsd-2-clause
- Created: 2013-07-22T13:22:02.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-07-25T16:58:15.000Z (almost 13 years ago)
- Last Synced: 2024-04-14T15:46:46.161Z (over 2 years ago)
- Language: Go
- Size: 133 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
go-twitterstream
================
Go library to access Twitter's Streaming API.
**Documentation**: http://godoc.org/github.com/gedex/go-twitterstream/twitterstream
**Build Status**: [](https://travis-ci.org/gedex/go-twitterstream)
## Basic Usage
~~~go
config := &twitterstream.Config{
ConsumerKey: "YOUR CONSUMER KEY",
ConsumerSecret: "YOUR CONSUMER SECRET",
OAuthToken: "YOUR OAUTH TOKEN",
OAuthTokenSecret: "YOUR OAUTH TOKEN SECRET",
}
client := twitterstream.NewClient(config)
client.HandleFunc("tweet", func(s *twitterstream.Stream) {
log.Printf("user %v tweets: %v\n", s.Tweet.User.ScreenName, s.Tweet.Text)
})
err := client.Public.Sample()
if err != nil {
log.Fatal(err)
}
~~~
Please see [examples](./examples) for a complete example.
## Credits
* [twitterstream](twitterstream) for Go
* [tweetstream](https://github.com/tweetstream/tweetstream) RubyGem
* [Twitter Platform Documentation](https://dev.twitter.com/docs)
## License
This library is distributed under the BSD-style license found in the LICENSE.md file.