Skip to content

OAuth support draft

marcelklehr edited this page Aug 9, 2012 · 4 revisions

OAuth API suggestions:

Consumer

<?php
$consumer = Tivoka\Client\OAuth::createConsumer($key, $secret);
// or
$consumer = Tivoka\Client\OAuth::consumer($key, $secret);
// or
$consumer = new Tivoka\Client\OAuth\Consumer($key, $secret);
?>

Connection

<?php
$connection = Tivoka\Client::connect('http://example.com/api');
$connection->setOAuthConsumer($consumer);
?>

or

<?php
$connection = Tivoka\Client::connect('http://example.com/api');
$connection->useOAuth($consumer);
?>
Clone this wiki locally