2017 © Pedro Peláez
 

library tuenti

Unofficial Tuenti API

image

keyvanakbary/tuenti

Unofficial Tuenti API

  • Tuesday, July 15, 2014
  • by keyvanakbary
  • Repository
  • 1 Watchers
  • 3 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

PHP Tuenti API

Build Status, (*1)

Unofficial Tuenti API., (*2)

Setup and Configuration

Add the following to your composer.json file, (*3)

{
    "require": {
        "keyvanakbary/tuenti": "~1.0"
    }
}

Update the vendor libraries, (*4)

curl -s http://getcomposer.org/installer | php
php composer.phar install

Usage

<?php

require 'vendor/autoload.php';

use Tuenti\Client;
use Tuenti\ApiError;

$t = new Client('foo@example.com', 'password');

try {
    $profile = $t->getProfile($t->me());
} catch (ApiError $e) {
    error_log($e->getMessage());
}

Quick Reference

Current User

The method me() returns your user id. You can use it in methods that require a $userId to retrieve your own data., (*5)

$t->getProfile($t->me());

Profile

Get profile for a given user, (*6)

getProfile($userId)

Get profile wall with statuses for a given user, (*7)

getProfileWallWithStatus($userId [, $page = 0 [, $size = 10]])

Get all your friends, (*8)

getFriends()

Set your status, (*9)

setStatus($status)

Notifications

Get personal notifications, (*10)

getPersonalNotifications()

Get friends notifications, (*11)

getFriendsNotifications([$page = 0 [, $size = 10]])

Messages

Get inbox message threads, (*12)

getInbox([$page = 0 [, $size = 10]])

Get sent message threads, (*13)

getSentBox([$page = 0 [, $size = 10]])

Get spam message threads, (*14)

getSpamBox([$page = 0 [, $size = 10]])

Retrieve messages from a given thread, (*15)

getThread($threadKey [, $page = 0 [, $size = 10]])

Send a message, (*16)

sendMessage($userId, $threadKey, $message)

Photos

Get user albums, (*17)

getAlbums($userId [, $page = 0 [, $size = 10]])

Get album photos for a given user, (*18)

getAlbumPhotos($userId, $albumId [, $page = 0])

Get all the tags for a photo, (*19)

getPhotoTags($photoId)

Add a post to a photo wall, (*20)

addPostToPhotoWall($photoId, $message)

Get the wall posts for a given photo, (*21)

getPhotoWall($photoId [, $page = 0 [, $size = 10]])

Iterate over all your albums and photos, (*22)

foreach ($t->getAlbums($t->me()) as $albumId => $album) {
    // do something with $album
    for ($i = 0; $i < $album['size']; $i = $i + Client::DEFAULT_PAGE_SIZE) {
        $page = floor($i / Client::DEFAULT_PAGE_SIZE);
        $photos = current($t->getAlbumPhotos($t->me(), $albumId, $page));
        foreach ($photos as $photo) {
            // do something with $photo
        }
    }
}

Events

Get upcoming events. You can include birthays, (*23)

getUpcomingEvents([$size = 10 [, $includeBirthdays = false]])

Retrieve event, (*24)

getEvent($eventId)

Get the wall for a given event, (*25)

getEventWall($eventId [, $page = 0 [, $size = 10]])

The Versions

15/07 2014

dev-master

9999999-dev

Unofficial Tuenti API

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

api client tuenti kiwwito

15/07 2014

v1.0.2

1.0.2.0

Unofficial Tuenti API

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

api client tuenti kiwwito

02/03 2014

v1.0.1

1.0.1.0

Unofficial Tuenti API

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

api client tuenti kiwwito

08/02 2014

v1.0.0

1.0.0.0

Unofficial Tuenti API

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

api client tuenti kiwwito