Skip to main content

Django implementation for Twitter API

Project description

# Django Twitter API

[![Build Status](https://travis-ci.org/ramusus/django-twitter-api.png?branch=master)](https://travis-ci.org/ramusus/django-twitter-api) [![Coverage Status](https://coveralls.io/repos/ramusus/django-twitter-api/badge.png?branch=master)](https://coveralls.io/r/ramusus/django-twitter-api)

Application for interacting with Twitter API objects using Django model interface

## Installation

pip install django-twitter-api

Add into `settings.py` lines:

INSTALLED_APPS = (
...
'oauth_tokens',
'twitter-api',
)

# oauth-tokens settings
OAUTH_TOKENS_HISTORY = True # to keep in DB expired access tokens
OAUTH_TOKENS_TWITTER_CLIENT_ID = '' # application ID
OAUTH_TOKENS_TWITTER_CLIENT_SECRET = '' # application secret key
OAUTH_TOKENS_TWITTER_USERNAME = '' # user login
OAUTH_TOKENS_TWITTER_PASSWORD = '' # user password

## Usage examples

### Simple API Graph request

>>> from facebook_api.utils import graph
>>> graph('zuck')
Node(<Graph(u'https://graph.facebook.com/zuck') at 0xb1cbfac>,
{'first_name': 'Mark',
'gender': 'male',
'id': '4',
'last_name': 'Zuckerberg',
'link': 'http://www.facebook.com/zuck',
'locale': 'en_US',
'name': 'Mark Zuckerberg',
'updated_time': '2013-03-13T20:36:43+0000',
'username': 'zuck'})

>>> graph('zuck', fields='id,name')
Node(<Graph(u'https://graph.facebook.com/zuck') at 0xb1d2a8c>,
{'id': '4', 'name': 'Mark Zuckerberg'})

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-twitter-api-0.1.0.tar.gz (28.0 kB view details)

Uploaded Source

File details

Details for the file django-twitter-api-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django-twitter-api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 807fc2a69d29a5461b6ba93262f5a07cffa7529f2558b4448d67a99ea9a00c42
MD5 a5759d96327ca5bd017112c70a80efa1
BLAKE2b-256 81d3ec8ff4e8bfc571b3ae6c8d650362c30db265fac990ffb68324d03b7a1f70

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page