Go library for accessing Twitter's Stream API
Go
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
twitterstream
.gitignore
.travis.yml
LICENSE.md
README.md

README.md

go-twitterstream

Go library to access Twitter's Streaming API.

Documentation: http://godoc.org/github.com/gedex/go-twitterstream/twitterstream

Build Status: Build Status

Basic Usage

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 for a complete example.

Credits

License

This library is distributed under the BSD-style license found in the LICENSE.md file.