Django implementation for vkontakte API
Project description
Django Vkontakte API [![Build Status](https://travis-ci.org/ramusus/django-vkontakte-api.png?branch=master)](https://travis-ci.org/ramusus/django-vkontakte-api)
====================
Приложение позволяет взаимодействовать с объектами Вконтакте API используя стандартные модели Django
Установка
---------
pip install django-vkontakte-api
В `settings.py` необходимо добавить:
INSTALLED_APPS = (
...
'oauth_tokens',
'vkontakte_api',
)
# oauth-tokens settings
OAUTH_TOKENS_HISTORY = True # to keep in DB expired access tokens
OAUTH_TOKENS_VKONTAKTE_CLIENT_ID = '' # application ID
OAUTH_TOKENS_VKONTAKTE_CLIENT_SECRET = '' # application secret key
OAUTH_TOKENS_VKONTAKTE_SCOPE = ['ads,wall,photos,friends,stats'] # application scopes
OAUTH_TOKENS_VKONTAKTE_USERNAME = '' # user login
OAUTH_TOKENS_VKONTAKTE_PASSWORD = '' # user password
OAUTH_TOKENS_VKONTAKTE_PHONE_END = '' # last 4 digits of user mobile phone
Покрытие методов API
--------------------
* [resolveScreenName](http://vk.com/dev/resolveScreenName) – определяет тип объекта (пользователь, группа, приложение) и его идентификатор по короткому имени screen_name;
* [likes.getList](http://vk.com/dev/likes.getList) – возвращает список пользователей, которые добавили объект в список «Мне нравится»;
Примеры использования
---------------------
### Запрос API
>>> from vkontakte_api.utils import api_call
>>> api_call('resolveScreenName', **{'screen_name': 'durov'})
{u'object_id': 1, u'type': u'user'}
>>> api_call('resolveScreenName', **{'screen_name': 'cocacola'})
{u'object_id': 16297716, u'type': u'group'}
====================
Приложение позволяет взаимодействовать с объектами Вконтакте API используя стандартные модели Django
Установка
---------
pip install django-vkontakte-api
В `settings.py` необходимо добавить:
INSTALLED_APPS = (
...
'oauth_tokens',
'vkontakte_api',
)
# oauth-tokens settings
OAUTH_TOKENS_HISTORY = True # to keep in DB expired access tokens
OAUTH_TOKENS_VKONTAKTE_CLIENT_ID = '' # application ID
OAUTH_TOKENS_VKONTAKTE_CLIENT_SECRET = '' # application secret key
OAUTH_TOKENS_VKONTAKTE_SCOPE = ['ads,wall,photos,friends,stats'] # application scopes
OAUTH_TOKENS_VKONTAKTE_USERNAME = '' # user login
OAUTH_TOKENS_VKONTAKTE_PASSWORD = '' # user password
OAUTH_TOKENS_VKONTAKTE_PHONE_END = '' # last 4 digits of user mobile phone
Покрытие методов API
--------------------
* [resolveScreenName](http://vk.com/dev/resolveScreenName) – определяет тип объекта (пользователь, группа, приложение) и его идентификатор по короткому имени screen_name;
* [likes.getList](http://vk.com/dev/likes.getList) – возвращает список пользователей, которые добавили объект в список «Мне нравится»;
Примеры использования
---------------------
### Запрос API
>>> from vkontakte_api.utils import api_call
>>> api_call('resolveScreenName', **{'screen_name': 'durov'})
{u'object_id': 1, u'type': u'user'}
>>> api_call('resolveScreenName', **{'screen_name': 'cocacola'})
{u'object_id': 16297716, u'type': u'group'}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-vkontakte-api-0.4.4.tar.gz
(27.1 kB
view hashes)
Close
Hashes for django-vkontakte-api-0.4.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c827bfa0f142dff68972510c5ef2b7de3923fd844426c2f434180e227d0f75db |
|
MD5 | a778ef909e3dcbbdb844ab7a86637e99 |
|
BLAKE2b-256 | c27605a16a3d8bf98bd71f0e7f272d85b3bed44ba7f78699622b123b9b39c9d2 |