twitter-conduit: Twitter API package with conduit interface and Streaming API support.

[ bsd3, conduit, library, web ] [ Propose Tags ]

This package provides bindings to Twitter's APIs (see https://dev.twitter.com/).

This package uses http-conduit package for access Twitter API (see http://hackage.haskell.org/package/http-conduit). This package also depends to twitter-types package (see http://hackage.haskell.org/package/twitter-types).

You can find basic examples in the https://github.com/himura/twitter-conduit/tree/master/sample directory.

This package is under development. If you find something that has not been implemented yet, please send a pull request or open an issue on GitHub.


[Skip to Readme]
Versions [faq] 0.0.1, 0.0.2, 0.0.2.1, 0.0.3, 0.0.4, 0.0.5, 0.0.5.1, 0.0.5.2, 0.0.5.3, 0.0.5.4, 0.0.5.5, 0.0.5.6, 0.0.5.7, 0.0.5.8, 0.0.6, 0.0.7, 0.0.8, 0.0.8.1, 0.1.0, 0.1.1, 0.1.1.1, 0.1.2, 0.1.3, 0.2.0, 0.2.1, 0.2.2, 0.2.2.1, 0.2.2.2, 0.2.3, 0.3.0, 0.4.0 (info)
Dependencies aeson (>=0.7), attoparsec (>=0.10), attoparsec-conduit (>=1.0), authenticate-oauth (>=1.3), base (==4.*), bytestring (>=0.9), case-insensitive, conduit (==1.0.*), containers, data-default (>=0.3), directory, failure (>=0.2), filepath, http-client (>=0.3), http-conduit (==2.0.*), http-types, lens (>=4.0), lifted-base (>=0.1), monad-control (>=0.3), monad-logger, network, process, resourcet (>=0.4.3 && <0.5), scotty (>=0.7), shakespeare (>=2.0), template-haskell, text (>=0.11), time, transformers (>=0.2.2), transformers-base, twitter-conduit, twitter-types (>=0.2) [details]
License BSD-3-Clause
Author HATTORI Hiroki, Hideyuki Tanaka, Takahiro HIMURA
Maintainer Takahiro HIMURA <taka@himura.jp>
Category Web, Conduit
Home page https://github.com/himura/twitter-conduit
Source repo head: git clone git://github.com/himura/twitter-conduit.git
Uploaded by TakahiroHimura at Mon Apr 7 15:49:20 UTC 2014
Distributions Debian:0.3.0, NixOS:0.4.0
Executables oauth_pin, oauth_callback, userstream, simple
Downloads 13528 total (191 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Successful builds reported [all 1 reports]

Modules

[Index]

Flags

NameDescriptionDefaultType
build-samples

build samples

DisabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for twitter-conduit-0.0.2.1

[back to package description]

twitter-conduit: An Conduit based Twitter API library for Haskell

Build Status

About

This is an conduit based Twitter API library for Haskell, including Streaming API supports.

Documentation is available in hackage.

Usage

$ cabal update
$ cabal install twitter-conduit

Quick Start

For a runnable example, see sample/simple.hs. You can find other various examples in sample directory.

Run Samples

Build

If you would like to use cabal sandbox, prepare sandbox as below:

$ cabal sandbox init

and then,

$ cabal configure -fbuild-samples
$ cabal build

Run

First, you must obtain consumer key and secret from Twitter Application Management page, and you have to set those values to environment variables as shown below:

$ export OAUTH_CONSUMER_KEY="YOUR APPLICATION CONSUMER KEY"
$ export OAUTH_CONSUMER_SECRET="YOUR APPLICATION CONSUMER SECRET"

Before you run examples, you must prepare OAuth access token and secret. You can obtain access token and secret by using either PIN or web callback.

If you would like to use the PIN method, you run simply as below, and follow instructions:

$ cabal run oauth_pin

On the other hand, If you would like to use the callback method, do as follows:

$ cabal run oauth_callback

and open http://localhost:3000/signIn in your browser.

In both cases, you can obtain OAUTH_ACCESSS_TOKEN and OAUTH_ACCESS_SECRET variables, then you should set those values to environment variables as shown below:

$ export OAUTH_ACCESS_TOKEN="YOUR ACCESS TOKEN"
$ export OAUTH_ACCESS_SECRET="YOUR ACCESS SECRET"

Finally, you can access Twitter UserStream as follows:

$ cabal run userstream

Examples

TODO

Authors and Credits

twitter-conduit initially was written by Takahiro Himura. We would like to thank everyone who supported and contributed to the development of this library.