Class vimeo_oauth - echiong/testRepo GitHub Wiki
##Class vimeo_oauth
Vimeo Oauth
Package: [[application<a href="Package application.libraries.md">libraries]]
Located at application/libraries/vimeo_oauth.php
##Methods summary
public vimeo_oauth ( array $params )
Pass in a parameters array which should look as follows: array('key'=>'example.com', 'secret'=>'mysecret'); Note that the secret should either be a hash string for HMAC signatures or a file path string for RSA signatures.
Parameters
$params
array
$params Contains a set of key value pairs
public string|array get_request_token ( string $callback )
This is called to begin the oauth token exchange. This should only need to be called once for a user, provided they allow oauth access. It will return a URL that your site should redirect to, allowing the user to login and accept your application.
Parameters
$callback
string
$callback The page on your site you wish to return to after the user grants your
application access.
Returns
string|array
Either the URL to redirect to, or if they specified HMAC signing an array with
the token_secret and the redirect url
public array get_access_token ( string $token = false, string $secret = false, string $verifier = false )
This is called to finish the oauth token exchange. This too should only need to be called once for a user. The token returned should be stored in your database for that particular user.
Parameters
$token
string
$token This is the oauth_token returned with your callback url
$secret
string
$secret This is the token secret supplied from the request (Only required if
using HMAC)
$verifier
string
$verifier This is the oauth_verifier returned with your callback url
Returns
array
access token and token secret
public object get_user_credentials ( string $token = false, string $secret = false )
Performs a verify credentials request.
Parameters
$token
string
$token Access response oauth token
$secret
string
$secret Access response oauth token secret
Returns
object
Response object
public object get_user_quota ( string $token, string $secret )
Retrieves the user quota.
Parameters
$token
string
$token Access response oauth token
$secret
string
$secret Access response oauth token secret
Returns
object
Response object
public object get_user_uploadticket ( string $token, string $secret )
Retrieves the user upload ticket.
Parameters
$token
string
$token Access response oauth token
$secret
string
$secret Access response oauth token secret
Returns
object
Response object
public object complete_upload ( string $token, string $secret, integer $ticket_id, string $filename )
Completes the upload.
Parameters
$token
string
$token Access response oauth token
$secret
string
$secret Access response oauth token secret
$ticket_id
integer
$ticket_id Ticket ID
$filename
string
$filename Filename
Returns
object
Response object
public object get_videos ( string $token, string $secret )
Retrieves the video.
Parameters
$token
string
$token Access response oauth token
$secret
string
$secret Access response oauth token secret
Returns
object
Response object
public get_video_info ( string $token, string $secret, string $id )
Retrieves the information of the video.
Parameters
$token
string
$token Access response oauth token
$secret
string
$secret Access response oauth token secret
$id
string
$id Video ID
public object get_user_info ( string $token, string $secret )
Retrieves the user information.
Parameters
$token
string
$token Access response oauth token
$secret
string
$secret Access response oauth token secret
Returns
object
Response object
<table class="summary" id="constants">
<caption>Constants summary</caption>
<tr data-order="SCHEME" id="SCHEME">
<td class="attributes"><code>string</code></td>
<td class="name"><code>
SCHEME
'https'
<div class="description detailed">
</div>
</div></td>
</tr>
<tr data-order="HOST" id="HOST">
<td class="attributes"><code>string</code></td>
<td class="name"><code>
HOST
'vimeo.com'
<div class="description detailed">
</div>
</div></td>
</tr>
<tr data-order="AUTHORIZE_URI" id="AUTHORIZE_URI">
<td class="attributes"><code>string</code></td>
<td class="name"><code>
AUTHORIZE_URI
'/oauth/authorize'
<div class="description detailed">
</div>
</div></td>
</tr>
<tr data-order="AUTHENTICATE_URI" id="AUTHENTICATE_URI">
<td class="attributes"><code>string</code></td>
<td class="name"><code>
AUTHENTICATE_URI
'/oauth/authenticate'
<div class="description detailed">
</div>
</div></td>
</tr>
<tr data-order="REQUEST_URI" id="REQUEST_URI">
<td class="attributes"><code>string</code></td>
<td class="name"><code>
REQUEST_URI
'/oauth/request_token'
<div class="description detailed">
</div>
</div></td>
</tr>
<tr data-order="ACCESS_URI" id="ACCESS_URI">
<td class="attributes"><code>string</code></td>
<td class="name"><code>
ACCESS_URI
'/oauth/access_token'
<div class="description detailed">
</div>
</div></td>
</tr>
<tr data-order="VERIFYCREDENTIALS_URI" id="VERIFYCREDENTIALS_URI">
<td class="attributes"><code>string</code></td>
<td class="name"><code>
VERIFYCREDENTIALS_URI
'/1/account/verify_credentials.json'
<div class="description detailed">
</div>
</div></td>
</tr>
<tr data-order="GETQUOTA" id="GETQUOTA">
<td class="attributes"><code>string</code></td>
<td class="name"><code>
GETQUOTA
'/api/rest/v2?format=json&method=vimeo.videos.upload.getQuota'
<div class="description detailed">
</div>
</div></td>
</tr>
<tr data-order="GETTICKET" id="GETTICKET">
<td class="attributes"><code>string</code></td>
<td class="name"><code>
GETTICKET
'/api/rest/v2?format=json&method=vimeo.videos.upload.getTicket'
<div class="description detailed">
</div>
</div></td>
</tr>
<tr data-order="UPLOADCOMPLETE" id="UPLOADCOMPLETE">
<td class="attributes"><code>string</code></td>
<td class="name"><code>
UPLOADCOMPLETE
'/api/rest/v2?format=json&method=vimeo.videos.upload.complete'
<div class="description detailed">
</div>
</div></td>
</tr>
<tr data-order="GETVIDEOS" id="GETVIDEOS">
<td class="attributes"><code>string</code></td>
<td class="name"><code>
GETVIDEOS
'/api/rest/v2?format=json&method=vimeo.videos.getAll'
<div class="description detailed">
</div>
</div></td>
</tr>
<tr data-order="GETVIDEOINFO" id="GETVIDEOINFO">
<td class="attributes"><code>string</code></td>
<td class="name"><code>
GETVIDEOINFO
'/api/rest/v2?format=json&method=vimeo.videos.getInfo'
<div class="description detailed">
</div>
</div></td>
</tr>
<tr data-order="GETINFO" id="GETINFO">
<td class="attributes"><code>string</code></td>
<td class="name"><code>
GETINFO
'/api/rest/v2?format=json&method=vimeo.people.getInfo'
<div class="description detailed">
</div>
</div></td>
</tr>
</table>
<table class="summary" id="magicProperties">
<caption>Magic properties summary</caption>
<tr data-order="_consumer" id="m$_consumer">
<td class="attributes"><code>
public
array
</code></td>
<td class="name">
$_consumer
<div class="description detailed">
Contains the consumer secret and key
</div>
</div></td>
</tr>
</table>