Net::Vimeo - Make requests via OAuth to Vimeo Advanced API
Version 0.000004
use Net::Vimeo; my $vimeo = Net::Vimeo->new( consumer_key => 'xxxx', consumer_secret => 'yyyy' ); # First you need to get the authorization URL # If you need permission to upload a video, send the # permission parameter, otherwise you will only have read permission my $vimeo_oauth_url = $vimeo_oauth->get_authorization_url( permission => 'write' ); # Get the oauth_verifier from that url and # exchange the request tokens with access tokens $vimeo->get_access_token( { verifier => 'oauth_verifier' } ); # Now you are authorized....you can start playing my $request_params = { method => 'vimeo.activity.userDid', user_id => 'someuserid', page => 1, per_page => 10, format => 'json', }; my $result = $vimeo->make_api_request( 'GET', $request_params);
The canonical documentation for the Advanced API is at http://developer.vimeo.com/apis/advanced with the method listing residing at http://developer.vimeo.com/apis/advanced/methods
The distribution has a simple example bundled, and make sure to study the tests and Net::Vimeo::OAuth for further insight into the overall process of authentication.
my $vimeo = Net::Vimeo->new( consumer_key => 'xxxx', consumer_secret => 'yyyy', access_token => 'zzzz', # optional access_token_secret => 'zzzz_secret' # optional );
On construction, consumer_key and consumer_secret are mandatory to identify your app against Vimeo. In case you want your app to be "statically" provided with an access_token, you may set one on construction, but you'll commonly use the methods around get_access_token() to ask a user for access so your app can act on behalf of granting users. See Net::Vimeo::OAuth for the underlying mechanism.
Returns a Vimeo URL (URI-Object) which you will use to send a user to a page (on Vimeo) where she may accept or decline that your app receives access to her account. Acceptance means the user issues an access_token for your app, an alphanumeric string.
After you have your access tokens via OAuth you can start making requests to Vimeo Advanced API. Arguments necessary to make the call to Vimeo Advanced API are: $method which is a string representing the HTTP method needed for your request. The second one is the api request params, you can find the needed params on Vimeo Advanced API documentation.
$method
$vimeo->make_api_request( 'GET', $request_params);
Mirela Iclodean, <imirela at cpan.org>
<imirela at cpan.org>
Net::Vimeo::OAuth
Please report any bugs or feature requests to bug-net-vimeo at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Vimeo. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-net-vimeo at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Net::Vimeo
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-Vimeo
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Net-Vimeo
CPAN Ratings
http://cpanratings.perl.org/d/Net-Vimeo
Search CPAN
http://search.cpan.org/dist/Net-Vimeo/
Copyright 2014 Mirela Iclodean.
This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0).
To install Net::Vimeo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Vimeo
CPAN shell
perl -MCPAN -e shell install Net::Vimeo
For more information on module installation, please visit the detailed CPAN module installation guide.