読者です 読者をやめる 読者になる 読者になる

DRYな備忘録

Don't Repeat Yourself.

The simplest Twitter Streaming API by Golang

otiai10/twistream · GitHub 練習をかねてつくったよ

The very simplest interface to use Twitter Streaming API by golang.

timeline, _ := twistream.New(
    "https://userstream.twitter.com/1.1/user.json",
    CONSUMERKEY,
    CONSUMERSECRET,
    ACCESSTOKEN,
    ACCESSTOKENSECRET,
)

for {
    status := <-timeline.Listen()
    fmt.Println(status)
}

That's all :)

f:id:otiai10:20140708024556p:plain