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

[ bsd3, conduit, library, web ] [ Propose Tags ] [ Report a vulnerability ]
This version is deprecated.

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

This package uses the http-conduit package for accessing the Twitter API (see http://hackage.haskell.org/package/http-conduit). This package also depends on the 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]

Flags

Automatic Flags
NameDescriptionDefault
network-uri

Get Network.URI from the network-uri package

Enabled
lens-aeson

Get Data.Aeson.Lens from the lens-aeson package

Enabled
build-samples

build samples

Disabled
use-debug-output

use debug output when running testsuites

Disabled
run-integrated-test

use debug output when running testsuites

Disabled

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

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 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, 0.5.0, 0.5.1, 0.6.0, 0.6.1 (info)
Dependencies aeson (>=0.7.0.5), attoparsec (>=0.10), authenticate-oauth (>=1.3), base (>=4.5 && <5), bytestring (>=0.9), case-insensitive, conduit (>=1.1), conduit-extra (>=1.1), containers, data-default (>=0.3), directory, filepath, http-client (>=0.3), http-conduit (>=2.0 && <2.2), http-types, lens (>=4.0 && <4.5), lens-aeson (>=1), monad-control, monad-logger, network (<2.6), network-uri (>=2.6), process, resourcet (>=1.0), scotty (>=0.7), template-haskell, text (>=0.11), time, transformers (>=0.2.2), transformers-base, twitter-conduit, twitter-types (>=0.5) [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 2014-09-13T16:25:48Z
Distributions Debian:0.5.0, LTSHaskell:0.6.1, NixOS:0.6.1
Reverse Dependencies 3 direct, 0 indirect [details]
Executables oauth_pin, oauth_callback, userstream, simple
Downloads 22951 total (159 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for twitter-conduit-0.0.6

[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.