Search Gear #3 – Go, coveralls.io, anaconda, twitter, TDD Cases!

Search Gear Notes

Search Gear Notes

Go, coveralls.io, anaconda, twitter, TDD Cases

coveralls.io comes through with free repos for academics

$GOPATH Lost – treatise at http://stackoverflow.com/questions/21499337/cannot-set-gopath-on-mac-osx
~/.bash_profile updated to contain export GOPATH=/Volumes/WorkingBox/Development/go and export PATH=$GOPATH/bin:$PATH

Seems anaconda is the twitter api I want as it works with functions.

  1. go get -v github.com/ChimeraCoder/anaconda
  2. Full Doc : https://godoc.org/github.com/ChimeraCoder/anaconda
  3. tweet structure https://dev.twitter.com/docs/platform-objects/tweets
  4. anaconda.SetConsumerKey(“your-consumer-key”)
    anaconda.SetConsumerSecret(“your-consumer-secret”)
    api := anaconda.NewTwitterApi(“your-access-token”, “your-access-token-secret”)

 

  1. go run searchgear.go
  2. Error: {"errors":[{"message":"Invalid or expired token","code":89}]}
  3. http://stackoverflow.com/questions/21743841/how-to-avoid-annoying-error-declared-and-not-used-from-golang
  4. Swap key sets – consumer is the user and your access token is for the application.
  5. https://dev.twitter.com/discussions/15626

http://golang.org/doc/effective_go.html

CODE:
search_result, err := api.GetSearch("golang", nil)
if err != nil {
panic(err)
}
for _, tweet := range search_result {
fmt.Printf("%v - @%v: %v\n", tweet.CreatedAt, tweet.User.ScreenName, tweet.Text)
}

OUTPUT:
Thu Aug 07 10:13:39 +0000 2014 - @TvorZasp: Обзор интересного редактора EDI, написанного на #golang http://t.co/xI6Xkhv30i | http://t.co/ahwaQ0q2y5

  1. @twitterapi are there any TDD cases for testing developers twitter code #golang
  2. No replies
  3. #gloang – any experiences with i18n packages – I’ve only found github.com/landjur/go-i18n
  4. No replies
  5. No other suggestions go get -v github.com/landjur/go-i18n
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s