python-tuenti

Wrapper around the latest Tuenti API


License
BSD-3-Clause
Install
pip install python-tuenti==1.0.0

Documentation

python-tuenti

Build Status Pypi Package Downloads

Overview

Wrapper around the latest Tuenti API.

Installation

Install using pip, including any optional packages you want...

$ pip install python-tuenti

...or clone the project from github.

$ git clone git@juanriaza/python-tuenti.git
$ cd python-tuenti
$ pip install -r requirements.txt

How to use it?

With your credentials:

from tuenti import TuentiSocialMessenger

user = 'yosoycani@hotmail.com'
password = 'olakase'

t = TuentiSocialMessenger.from_credentials(user, password)

…or you can retrieve some auth data and save it for later…

auth_token, installation_id = t.get_auth_data()

…to use the API without your credentials:

t = TuentiSocialMessenger.from_auth_token(user, auth_token, installation_id)

And fire some requests:

# single request
data = t.request('Feed_getShareFeed', {'max': 20})

# with a shortcut
data = t.Feed_getShareFeed({'max': 20})

# multiple request
data = t.mrequest(('User_getRelationshipData'), ('Feed_getShareFeed', {'max': 20}), ...)

All the available requests are documented here.

Running the tests

$ ./test_tuenti.py

Changelog

1.1.0

27th Nov 2013

  • Shortcut for fire a request.
  • Registration test fixed.

1.0.0

9th Jan 2012

  • First release.