Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blixt/go-twitter
Simple Go library for Twitter
https://github.com/blixt/go-twitter
Last synced: about 1 month ago
JSON representation
Simple Go library for Twitter
- Host: GitHub
- URL: https://github.com/blixt/go-twitter
- Owner: blixt
- Created: 2012-08-25T18:31:57.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2012-08-25T18:55:39.000Z (about 12 years ago)
- Last Synced: 2024-04-21T10:12:34.001Z (7 months ago)
- Language: Go
- Size: 89.8 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go Twitter
This is a simple module to communicate with the Twitter API.
**Note:** This is library is currently very simple and only supports use of the
stream API.## Installation
go get github.com/blixt/go-twitter/twitter
## Examples
### Stream tweets in real time
package main
import (
"fmt"
"github.com/blixt/go-twitter/twitter"
)
func main() {
stream := &twitter.StreamApi{"username", "password"}
tweets := make(chan *twitter.Tweet)
go stream.StatusesFilter([]string{"hello"}, tweets)
for tweet := range tweets {
fmt.Printf("@%s: \"%s\"\n", tweet.User.ScreenName, tweet.Text)
}
}