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.2.tar.gz (29.5 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for django-twitter-api-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c22fa8b04210974241684b0827bdf128bebcf8b31c874071fe1ebb3e7fa32b05
MD5 273f5305de5945a783fe5fcdfeaadf81
BLAKE2b-256 138c840265a9f0f940b70ec226cf2436652c9fb7fafddd4720474f0fb96fc60f

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