GithubHelp home page GithubHelp logo

vkontakte's Introduction

vkontakte

https://travis-ci.org/kmike/vkontakte.png?branch=master https://coveralls.io/repos/kmike/vkontakte/badge.png?branch=master

This repo is a fork of https://bitbucket.org/kmike/vkontakte/ and updated prior to support python3.

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

andrewshkovskii avatar homm avatar

Watchers

Oleg Sharov avatar James Cloos avatar Arsenii avatar Alexander Perlamutrov avatar Filippov Andrey avatar Alex Sova avatar  avatar

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.