Giter Site home page Giter Site logo

vkontakte's Introduction

vkontakte

image

image

This is a vk.com (aka vkontakte.ru, largest Russian social network) python API wrapper. The goal is to support all API methods (current and future) that can be accessed from server.

Installation

$ pip install vkontakte

Usage

>>> import vkontakte
>>> vk = vkontakte.API('my_api_id', 'my_api_secret')
>>> print vk.getServerTime()
1282689362

>>> vk = vkontakte.API(token='my_access_token')
>>> print vk.getServerTime()
1282689362

>>> profiles = vk.getProfiles(uids='1,2', fields='education')
>>> pavel = profiles[0]
>>> print pavel['last_name'], pavel['university_name']
Дуров СПбГУ

>>> # alternative syntax
>>> profiles = vk.get('getProfiles', uids='1,2', fields='education')
>>> pavel = profiles[0]
>>> print pavel['last_name'], pavel['university_name']
Дуров СПбГУ

>>> # custom timeout example (default timeout = 1s)
>>> vk = vkontakte.API('my_api_id', 'my_api_secret', timeout=5)
>>> print vk.getServerTime()
1282689362

>>> # syntax sugar for 'secure.*' methods
>>> print vk.secure.getSMSHistory()
None

All API methods that can be called from server should be supported.

See http://bit.ly/9Nzc8h for detailed API help.

OAuth2 access_token is supported (docs are here http://vkontakte.ru/developers.php?oid=-1&p=Авторизация)

vkontakte's People

Contributors

alekam avatar kmike avatar nuklea avatar quasiyoke avatar ramusus avatar valuerr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

vkontakte's Issues

Сломаный json от ВК

ВК начал помимо ошибки отдавать еще и ответ и жсон в итоге выглядит как
{error}{response} на что json питоновский ругается и вываливает ошибку
data = json.loads(response, strict=False)
File "/usr/lib/python2.7/json/init.py", line 341, in loads
return cls(encoding=encoding, **kw).decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 368, in decode
raise ValueError(errmsg("Extra data", s, end, len(s)))
Вот.

Версия в PyPi

Обнови, плиз на pypi версию библиотеки, а то pip install vkontakte ставит старую. Благодарю.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.