API Reference

ecl_twitter

copyright:
  1. 2012 Elm City Labs, LLC
license:

Apache 2.0, see LICENSE for more details.

class ecl_twitter.Twitter(token=None, secret=None, ssl=True)

Exposes a simple mechanism to interact with the Twitter API. E.g.,

>>> twitter = Twitter(access_token, access_secret_secret)
>>> twitter.favorites()
>>> twitter.statuses.user_timeline()
>>> twitter.statuses.user_timeline(screen_name='elmcitylabs')
ecl_twitter.twitter_begin(fun)

Django view decorator that gets a request token and secret from Twitter and redirects the user to a URL where they can authorize the application.

ecl_twitter.twitter_callback(fun)

Django view decorator that generates a Twitter OAuth access token and secret after the user authorizes the application. Must be used in conjunction with the twitter_begin decorator.

The wrapped view is passed an Objectifier object containing the the access token, the access token secret, the user id, and the user’s screen name.

Table Of Contents

This Page