The twitter-conduit package

[Tags: bsd3, library]

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]

Properties

Versions0.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 (info)
Change logChangeLog.md
Dependenciesaeson (>=0.7.0.5), attoparsec (>=0.10), authenticate-oauth (>=1.3), base (>=4.5 && <5), bytestring (>=0.10.2), 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), lens-aeson (>=1), monad-control, 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.6), twitter-types-lens (>=0.6) [details]
LicenseBSD3
AuthorHATTORI Hiroki, Hideyuki Tanaka, Takahiro HIMURA
MaintainerTakahiro HIMURA <taka@himura.jp>
StabilityExperimental
CategoryWeb, Conduit
Home pagehttps://github.com/himura/twitter-conduit
Source repositoryhead: git clone git://github.com/himura/twitter-conduit.git
Executablesoauth_pin, oauth_callback, userstream, simple
UploadedSun Jul 19 02:46:17 UTC 2015 by TakahiroHimura
Downloads2873 total (140 in last 30 days)
Votes
0 []
StatusDocs available [build log]
Last success reported on 2015-07-19 [all 1 reports]

Modules

[Index]

Flags

NameDescriptionDefaultType
network-uriGet Network.URI from the network-uri packageEnabledAutomatic
lens-aesonGet Data.Aeson.Lens from the lens-aeson packageEnabledAutomatic
build-samplesbuild samplesDisabledAutomatic
run-integrated-testuse debug output when running testsuitesDisabledAutomatic

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

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for twitter-conduit-0.1.1

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

Travis Hackage-Deps

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 install --only-dependencies -fbuild-samples
$ 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.