Skip to main content

Django implementation for vkontakte API

Project description

Django Vkontakte API
====================

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

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

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

pip install django-vkontakte-api

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

INSTALLED_APPS = (
...
'oauth_tokens',
'taggit',
'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;

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

### Запрос API

>>> from vkontakte_api.api import api_call
>>> api_call('resolveScreenName', **{'screen_name': 'durov'})
{u'object_id': 1, u'type': u'user'}
>>> api_call('users.get', **{'user_ids': 'durov'})
[{'first_name': u'Павел', 'last_name': u'Дуров', 'uid': 1}]

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

Uploaded Source

File details

Details for the file django-vkontakte-api-0.7.11.tar.gz.

File metadata

File hashes

Hashes for django-vkontakte-api-0.7.11.tar.gz
Algorithm Hash digest
SHA256 2bf3ce8e4d25b68c617f748901d74156e8404fdfd93daf33c9b5ae12815eebbe
MD5 364adc9a5d21082cf963c1ab4e9d54f6
BLAKE2b-256 0e443a592eebfba45b78cf25e2eae452d43585517c15d866b19e5476a3ece7f5

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