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