Skip to main content

Django implementation for odnoklassniki API Users

Project description

Django Odnoklassniki Users
==========================

[![PyPI version](https://badge.fury.io/py/django-odnoklassniki-users.png)](http://badge.fury.io/py/django-odnoklassniki-users) [![Build Status](https://travis-ci.org/ramusus/django-odnoklassniki-users.png?branch=master)](https://travis-ci.org/ramusus/django-odnoklassniki-users) [![Coverage Status](https://coveralls.io/repos/ramusus/django-odnoklassniki-users/badge.png?branch=master)](https://coveralls.io/r/ramusus/django-odnoklassniki-users)

Приложение позволяет взаимодействовать с профилями пользователей Вконтакте через Вконтакте API используя стандартные модели Django

Установка
---------

pip install django-odnoklassniki-users

В `settings.py` необходимо добавить:

INSTALLED_APPS = (
...
'oauth_tokens',
'taggit',
'odnoklassniki_api',
'odnoklassniki_users',
)

# oauth-tokens settings
OAUTH_TOKENS_HISTORY = True # to keep in DB expired access tokens
OAUTH_TOKENS_ODNOKLASSNIKI_CLIENT_ID = 12345678 # application id
OAUTH_TOKENS_ODNOKLASSNIKI_CLIENT_PUBLIC = '' # application public key
OAUTH_TOKENS_ODNOKLASSNIKI_CLIENT_SECRET = '' # application secret key
OAUTH_TOKENS_ODNOKLASSNIKI_SCOPE = [''] # application scopes
OAUTH_TOKENS_ODNOKLASSNIKI_USERNAME = '' # user login
OAUTH_TOKENS_ODNOKLASSNIKI_PASSWORD = '' # user password

Покрытие методов API
--------------------

* [users.getInfo](http://apiok.ru/wiki/display/api/users.getInfo) – возвращает большой массив информации, связанной с пользователем, для каждого переданного идентификатора пользователя;

Примеры использования
---------------------

### Получение пользователей по ID

>>> from odnoklassniki_users.models import User
>>> User.remote.fetch(ids=[561348705024,578592731938])
[<User: Евгений Дуров>,
<User: Михаил Коммуникатов>]

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-odnoklassniki-users-0.2.1.tar.gz (18.3 kB view details)

Uploaded Source

File details

Details for the file django-odnoklassniki-users-0.2.1.tar.gz.

File metadata

File hashes

Hashes for django-odnoklassniki-users-0.2.1.tar.gz
Algorithm Hash digest
SHA256 86404583706e44538100b86ef841496fe648f33f82c2f1c8758c3ccffbf85f28
MD5 53cd1d012734d8836b69ce4126434ac0
BLAKE2b-256 e51866f508a50925ea1a5017787a83126ea2d21b9247c943c1dbdab984e0f13e

See more details on using hashes here.

Provenance

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