Git Product home page Git Product logo

twitter-conduit's Introduction

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.

twitter-conduit's People

Contributors

himura avatar tanakh avatar dougburke avatar chiro avatar seagull-kamome avatar eagletmt avatar minamiyama1994 avatar bitemyapp avatar dato avatar kini avatar ocharles avatar seanhess avatar psibi avatar timjb avatar xhlkogitsune avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.