Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Latest commit

 

History

History
29 lines (21 loc) · 506 Bytes

README.md

File metadata and controls

29 lines (21 loc) · 506 Bytes

Twitter

Tiny twitter client library for golang

Usage

import "github.com/k0kubun/twitter"

func main() {
	client := &twitter.Client{
		ConsumerKey:       "CONSUMER_KEY",
		ConsumerSecret:    "CONSUMER_SECRET",
		AccessToken:       "ACCESS_TOKEN",
		AccessTokenSecret: "ACCESS_TOKEN_SECRET",
	}

	tweets, _ := client.HomeTimeline()
	for _, tweet := range tweets {
		fmt.Printf("%s: %s\n", tweet.User.ScreenName, tweet.Text)
	}

	client.UpdateStatus("Tweet test")
}

License

MIT License