top

Package anaconda provides structs and functions for accessing version 1.1 of the Twitter API.

Successful API queries return native Go structs that can be used immediately, with no need for type assertions.

Authentication

If you already have the access token (and secret) for your user (Twitter provides this for your own account on the developer portal), creating the client is simple:

anaconda.SetConsumerKey("your-consumer-key")
anaconda.SetConsumerSecret("your-consumer-secret")
api := anaconda.NewTwitterApi("your-access-token", "your-access-token-secret")

Queries

Executing queries on an authenticated TwitterApi struct is simple.

searchResult, _ := api.GetSearch("golang", nil)
for _ , tweet := range searchResult.Statuses {
    fmt.Print(tweet.Text)
}

Certain endpoints allow separate optional parameter; if desired, these can be passed as the final parameter.

v := url.Values{}
v.Set("count", "30")
result, err := api.GetSearch("golang", v)

Endpoints

Anaconda implements most of the endpoints defined in the Twitter API documentation: https://dev.twitter.com/docs/api/1.1. For clarity, in most cases, the function name is simply the name of the HTTP method and the endpoint (e.g., the endpoint `GET /friendships/incoming` is provided by the function `GetFriendshipsIncoming`).

In a few cases, a shortened form has been chosen to make life easier (for example, retweeting is simply the function `Retweet`)

More detailed information about the behavior of each particular endpoint can be found at the official Twitter API documentation.

Imported by 289 package(s)

  1. bitbucket.org/gabeguz/poster/twitter
  2. github.com/3zcurdia/feedscore/feed
  3. github.com/4gophers/goardiuno
  4. github.com/AndrewVos/ancientcitadel
  5. github.com/AndyNortrup/TweetHarvest
  6. github.com/Aorioli/tweelack
  7. github.com/ChimeraCoder/emojibot
  8. github.com/ChimeraCoder/gopherbot/plugins/url
  9. github.com/ChimeraCoder/mtwerk
  10. github.com/ChimeraCoder/otterandjen
  11. github.com/ChimeraCoder/twitter-follower-logger
  12. github.com/ConradIrwin/optimistic_dev
  13. github.com/ConradIrwin/twitter-followers
  14. github.com/DeanWen/TweetsCluster
  15. github.com/DmitryBugrov/twitter-monitor
  16. github.com/DrJosh9000/humbletwitter
  17. github.com/EricLagerg/monkslookingatbeer
  18. github.com/EricLagergren/monkslookingatbeer
  19. github.com/Francesco149/gweet
  20. github.com/GeoNet/haz/twitter
  21. github.com/GeoNet/msg/twitter
  22. github.com/InnoCenter-WVUReedCollegeofMedia/MobileMainStreet/model
  23. github.com/Kimau/ProcJam15
  24. github.com/Leimy/icy-metago/twitter
  25. github.com/Leimy/rx-go/twit
  26. github.com/MasterPpv/StreamQuestions
  27. github.com/Mixaill/Gotik/backends
  28. github.com/Mixaill/Gotik/common
  29. github.com/Mixaill/Gotik/services
  30. github.com/Mixaill/Gotik/twitter
  31. github.com/Mixaill/Gotik/utils
  32. github.com/Pashbee/twave/cmd
  33. github.com/Randuin/go-itter
  34. github.com/RockinTechBomb/fx-devtools-bot
  35. github.com/RockinTechBomb/gobot
  36. github.com/Rompei/Nyanpass-count-bot
  37. github.com/Rompei/bot-net-framework
  38. github.com/Rompei/habomaijiro-backend
  39. github.com/Rompei/lgb/twitter
  40. github.com/Rompei/nyanpass-count-bot
  41. github.com/Rompei/nyanpass-graph2/nyanpass
  42. github.com/Rompei/nyanpass-graph2/twitter
  43. github.com/SYM-CONTEST/Cookpad2014/kinennbi/crawler
  44. github.com/ShowMax/logfan-processors/input-twitter
  45. github.com/Stephen304/darkcli/twitter
  46. github.com/Syfaro/unfollowers
  47. github.com/SyntropyDev/mms-api/model
  48. github.com/abadojack/kowalski
  49. github.com/abhishekkr/twt/bird
  50. github.com/abishekk92/k-bot
  51. github.com/advanderveer/docksec/twitter
  52. github.com/advanderveer/libsecurity
  53. github.com/advanderveer/libsecurity/twitter
  54. github.com/afmobi/AFTAM
  55. github.com/aggrolite/hockeygfy
  56. github.com/agonopol/twitbot/lib
  57. github.com/akshaydeo/love_golang/controllers
  58. github.com/alextoombs/gotweet-server
  59. github.com/amauragis/bofhwits/bofhwitsbot
  60. github.com/andygrunwald/TrendingGithub
  61. github.com/aoisensi/akasoryo
  62. github.com/aoisensi/booltter
  63. github.com/aoisensi/gotwi
  64. github.com/arelangi/godash
  65. github.com/asim/asl.am.v2
  66. github.com/asim/screenplay_index
  67. github.com/aymerick/playground/go/twitter
  68. github.com/belak/go-seabird/plugins/linkproviders
  69. github.com/belak/go-seabird/plugins/url
  70. github.com/benfb/notable
  71. github.com/benfb/notable/notable
  72. github.com/benjojo/twitterd
  73. github.com/benoitletondor/TwitterBot/app
  74. github.com/bjacobel/goggles/functions/goggles
  75. github.com/bjacobel/goggles/functions/goggles/twitter
  76. github.com/blacknash/twoccer/tweets/v1
  77. github.com/blalor/tweet-streamer
  78. github.com/blalor/tweet-streamer/tweet_indexer
  79. github.com/blckur/blckur/accounts
  80. github.com/bradleyfalzon/rfc-bot
  81. github.com/brandonhilkert/pipeline-twitter
  82. github.com/brunohaid/econonerd/crawler
  83. github.com/bslatkin/tweeps2opml
  84. github.com/cfstras/talkateev
  85. github.com/chimeracoder/emojibot
  86. github.com/choueric/gogobird
  87. github.com/chubu/post-tweet-with-anaconda
  88. github.com/cloudspace/go-twitter-query
  89. github.com/collinvandyck/unf
  90. github.com/collinvandyck/unf/users
  91. github.com/cryptix/exp/twitClone
  92. github.com/ctwomey1/BirdCaller
  93. github.com/damienstanton/markovtweet
  94. github.com/danesparza/twitter-breaking-news
  95. github.com/danil/ptichka/libs/ptichka
  96. github.com/dankeroni/pajbot2/pbtwitter
  97. github.com/davelima/Twitter-GoClient
  98. github.com/deepakprakash/metascrape/contrib
  99. github.com/dherbst/go-lightning-sphero/src
  100. github.com/dkua/MissSudoku/bot
  101. github.com/dmathieu/groot
  102. github.com/ds0nt/web-commander
  103. github.com/dustinblackman/s
  104. github.com/e-dard/twitter-archive
  105. github.com/eljojo/shouldidothat
  106. github.com/erbridge/botcommentator
  107. github.com/erbridge/doppelbot
  108. github.com/erbridge/gotwit/twitter
  109. github.com/erbridge/lparchillect
  110. github.com/firba1/peeweebot
  111. github.com/floort/twittercleaner
  112. github.com/genehack/klatsch
  113. github.com/gophergala2016/FriendzoneTeam/services
  114. github.com/gth828r/machomangle
  115. github.com/h3poteto/hanazawabot/daily_tweet
  116. github.com/h3poteto/hanazawabot/refollow
  117. github.com/h3poteto/hanazawabot/tweet
  118. github.com/h3poteto/hanazawabot/userstream
  119. github.com/haarts/golang_news
  120. github.com/hashtock/tracker/listener
  121. github.com/hatorikibble/lojongbot
  122. github.com/hatorikibble/pegelbot
  123. github.com/heridev/gophergala_repositories/donpenabot
  124. github.com/hisaichi5518/yuriko
  125. github.com/hugbotme/bot-go/twitter
  126. github.com/hugbotme/hug-go/twitter
  127. github.com/hugbotme/hug-status/twitter
  128. github.com/iceskel/cold/handlers
  129. github.com/ideum/social-feed/social/twitter
  130. github.com/ieee0824/bals4rayban/bals
  131. github.com/ieee0824/bals4rayban/monitoring
  132. github.com/ieee0824/twitterBOT
  133. github.com/ifosch/goline/goline
  134. github.com/inchingforward/mist
  135. github.com/inchingforward/mnmnt/utils
  136. github.com/ironmig/AInspirationBot
  137. github.com/istanbul-coders/monsterghost
  138. github.com/jackyb/betterforit/tw
  139. github.com/jackyb/neobombe-sim/twitter
  140. github.com/jbowens/jrswish
  141. github.com/joek/pingu/twitter
  142. github.com/johnbeil/BuoyBot
  143. github.com/jonvaldes/gowitt
  144. github.com/joshfinnie/goweet
  145. github.com/jprobinson/NYTPlusContextBot
  146. github.com/jprobinson/NYTPlusContextBot/pluscontextbot
  147. github.com/jprobinson/newshound/bark
  148. github.com/jprobinson/newshound/bark/barkd
  149. github.com/jroimartin/tgbot/commands
  150. github.com/jsantell/fx-devtools-bot
  151. github.com/kaihendry/grepfavtweets
  152. github.com/kanosaki/picwall/server/core
  153. github.com/kanosaki/picwall/server/source
  154. github.com/kantorkel/knotenalarm
  155. github.com/keiththomps/tweet_menu
  156. github.com/keiththomps/tweet_menu/twitter
  157. github.com/kimitoboku/timelinelog
  158. github.com/kompiuter/gofollow
  159. github.com/kyokomi/bouillabaisse/twitter
  160. github.com/lamielle/dodo
  161. github.com/leandro-lugaresi/gRPC-twitter/server
  162. github.com/lindsaymarkward/app-twitter
  163. github.com/ling0322/twidoka
  164. github.com/logzer0/godash
  165. github.com/logzer0/godashdaemon
  166. github.com/lovelaced/spoon
  167. github.com/mantyr/BuoyBot
  168. github.com/manuviswam/TwitterBot
  169. github.com/marcw/pdesproges
  170. github.com/matthewrudy/obamasearch
  171. github.com/mikinano7/go_continent
  172. github.com/mikinano7/playing_itunes
  173. github.com/mikinano7/twitter_bot
  174. github.com/mingderwang/autoFollowTwitterDM
  175. github.com/mirdhyn/processors/input-twitter
  176. github.com/misogi/goshushow
  177. github.com/mk2/goisgod
  178. github.com/mmaker/otot
  179. github.com/mmaker/otot/twio
  180. github.com/mockra/loudred-go
  181. github.com/mogepiyo/jbbs2twitter
  182. github.com/morygonzalez/gyowitter
  183. github.com/moul/as-a-service
  184. github.com/mrichman/guffer
  185. github.com/mrtazz/twanity
  186. github.com/muesli/beehive/bees/twitterbee
  187. github.com/mukundmr/tweet_words
  188. github.com/mvrilo/metal-archives-updates
  189. github.com/mvrilo/reddit-twitter-bot
  190. github.com/nanddalal/Poli-Metrics
  191. github.com/nathan-osman/epigeon
  192. github.com/nickvanw/bogon/commands/plugins/twitter
  193. github.com/nmeum/marvin/modules/twitter
  194. github.com/novalagung/twitulama-cli
  195. github.com/nstehr/mosaicgen/indexer/collect
  196. github.com/nwolber/go-angles/twitter
  197. github.com/nyanshak/twitterbots/echobot
  198. github.com/nyanshak/twitterbots/stockbot
  199. github.com/nyanshak/twitterlib
  200. github.com/onuryilmaz/random-peek/models
  201. github.com/oov/nicoch
  202. github.com/pagoenka/tweet_words
  203. github.com/pajlada/pajbot2/pbtwitter
  204. github.com/patrickdappollonio/tdl-tweets
  205. github.com/pnelson/tweather
  206. github.com/pocke/eternal_force_nyan
  207. github.com/pocke/share_block-go
  208. github.com/r1cky1337/checkup
  209. github.com/radaiming/prpr/feeder
  210. github.com/ralfonso/sadbangbot/streaming
  211. github.com/rapidloop/followtheleader
  212. github.com/rb-de0/tsubuyaki
  213. github.com/remeh/TwitterBot/app
  214. github.com/remeh/wcie/db
  215. github.com/remeh/wcie/runtime
  216. github.com/rkirkendall/checkup
  217. github.com/rodkranz/golang-tweet/modules/twitter
  218. github.com/roger2000hk/BuoyBot
  219. github.com/rplauche/keyvaluetweeter
  220. github.com/rseymour/dreampitcher
  221. github.com/ryanmr/prism-cli
  222. github.com/sallyom/gotweet
  223. github.com/sallyom/openshift-go-cart/template
  224. github.com/samthor/twit
  225. github.com/sanear/eightBallBot
  226. github.com/scotthelm/tweetstuff
  227. github.com/sensorbee/twitter
  228. github.com/shimomo/tweet-location
  229. github.com/shinderuman/golang_csv2tweet
  230. github.com/shirase-aoi/twitterBOT
  231. github.com/shiratsuchi/friends-data
  232. github.com/shiwork/favpost
  233. github.com/shiwork/favpost/hengine
  234. github.com/shiwork/favpost/model
  235. github.com/shiwork/favpost/server
  236. github.com/shiwork/favpostbot
  237. github.com/shreyashirday/VoteSandersTwitterBot
  238. github.com/shumipro/meetapp/server/models
  239. github.com/shumipro/meetapp/server/oauth
  240. github.com/shumipro/meetapp/server/twitter
  241. github.com/shumipro/meetapp/server/views
  242. github.com/shumipro/tiptap/server/oauth
  243. github.com/shumipro/tiptap/server/repository
  244. github.com/shumipro/tiptap/server/twitter
  245. github.com/shumipro/tiptap/server/views
  246. github.com/shunyata/gopherbot/plugins/url
  247. github.com/sisteamnik/socfetch
  248. github.com/skeswa/owlbot
  249. github.com/soh335/egotter
  250. github.com/stephen304/darkcli/twitter
  251. github.com/tSU-RooT/ringot
  252. github.com/tSU-RooT/twatchmc
  253. github.com/taji-taji/qiite-bot
  254. github.com/tebriel/follow_stats
  255. github.com/tebriel/follow_stats/cache
  256. github.com/tebriel/follow_stats/twitter
  257. github.com/theaidem/githubble/backend
  258. github.com/thehowl/dont-you-dare-to-unfollow-me
  259. github.com/thekarel/go-twitter-proxy
  260. github.com/timwilkens/random/twitter_bot
  261. github.com/timwilkens/twitterbot
  262. github.com/tjackowiak/coelho
  263. github.com/toothrot/goat
  264. github.com/tyokoyama/googleapisampleforgce
  265. github.com/uovobw/gotapiri/twitter
  266. github.com/uovobw/tapirobot/twitter
  267. github.com/upamune/block
  268. github.com/upamune/tw
  269. github.com/urandom/readeef/popularity
  270. github.com/utahta/go-twitter-oauth
  271. github.com/v0l/gobot
  272. github.com/veino/processors/input-twitter
  273. github.com/veino/veino/processors/input-twitter
  274. github.com/vinitkumar/gobot
  275. github.com/voldyman/elementary-fixes-go
  276. github.com/waaaaargh/beehive/modules/twitterbee
  277. github.com/waitingkuo/brandkoop-profiler/analyzer
  278. github.com/writeas/htmlhouse
  279. github.com/wwkeyboard/twitter-links
  280. github.com/wwkeyboard/twitter-links/cmd
  281. github.com/yaegaki/go-nowplaying
  282. github.com/yinhm/friendfeed/client
  283. github.com/yukkurisinai/tokumei-kun
  284. github.com/yukkurisinai/tokumei-kun/handler
  285. github.com/zaynetro/tweets-sentiment-analysis
  286. github.com/zhaytee/botville
  287. gopkg.in/kyokomi/bouillabaisse.v0/twitter
  288. gopkg.in/sensorbee/twitter.v0
  289. hawx.me/code/tw-delete

Imported only in test by 69 package(s)

  1. github.com/140proof/anaconda
  2. github.com/9uuso/anaconda
  3. github.com/Abramovic/anaconda
  4. github.com/BharathMG/anaconda
  5. github.com/Fe4nn0r/anaconda
  6. github.com/Goryudyuma/anaconda
  7. github.com/Insightpool/anaconda
  8. github.com/Invoiced/anaconda
  9. github.com/Januzellij/anaconda
  10. github.com/JosePedroDias/anaconda
  11. github.com/My-Sign/anaconda
  12. github.com/SocialHarvestVendors/anaconda
  13. github.com/TheOnly92/anaconda
  14. github.com/Wouterbeets/anaconda
  15. github.com/abadojack/anaconda
  16. github.com/ahamidi/anaconda
  17. github.com/azr/anaconda
  18. github.com/benoitletondor/anaconda
  19. github.com/bep/anaconda
  20. github.com/bobrik/anaconda
  21. github.com/boynux/anaconda
  22. github.com/carbocation/anaconda
  23. github.com/cgag/anaconda
  24. github.com/chimeracoder/anaconda
  25. github.com/corrupt/anaconda
  26. github.com/djannot/anaconda
  27. github.com/djhworld/anaconda
  28. github.com/dominichamon/anaconda
  29. github.com/dyv/anaconda
  30. github.com/enj/anaconda
  31. github.com/erbridge/anaconda
  32. github.com/floresj/anaconda
  33. github.com/freman/anaconda
  34. github.com/gnanderson/anaconda
  35. github.com/hamman/anaconda
  36. github.com/i0n/anaconda
  37. github.com/iamthebot/anaconda
  38. github.com/ifross89/anaconda
  39. github.com/jbuberel/anaconda
  40. github.com/josephyzhou/anaconda
  41. github.com/jpibarra1130/anaconda
  42. github.com/jsha/anaconda
  43. github.com/katnegermis/anaconda
  44. github.com/keima/anaconda
  45. github.com/kendrickm/anaconda
  46. github.com/kirs/anaconda
  47. github.com/mdeheij/anaconda
  48. github.com/mhfs/anaconda
  49. github.com/my-sign/anaconda
  50. github.com/njern/anaconda
  51. github.com/nwolber/anaconda
  52. github.com/penguinxr2/anaconda
  53. github.com/pharrisee/anaconda
  54. github.com/pocke/anaconda
  55. github.com/polds/anaconda
  56. github.com/pymander/anaconda
  57. github.com/rendon/anaconda
  58. github.com/renquinn/anaconda
  59. github.com/rfsbraz/anaconda
  60. github.com/rplauche/anaconda
  61. github.com/satoshun/anaconda
  62. github.com/tkornblit/anaconda
  63. github.com/tpltnt/anaconda
  64. github.com/tumdum/anaconda
  65. github.com/whinette/anaconda
  66. github.com/wskinner/anaconda
  67. github.com/yagince/anaconda
  68. github.com/yanatan16/anaconda
  69. github.com/zhaytee/anaconda

Imports 4 package(s)

  1. github.com/azr/backoff
  2. github.com/ChimeraCoder/tokenbucket
  3. github.com/garyburd/go-oauth/oauth
  4. github.com/dustin/go-jsonpointer