Net::Vimeo::OAuth - OAuth for Vimeo Advanced API
Net::Vimeo::OAuth is a role that provides OAuth authentication for Vimeo Advanced API.
# First you need to authorize user to access data: my $vimeo = Net::Vimeo->new( consumer_key => 'your_app_key', consumer_secret => 'your_app_secret_key', ); # To get access tokens you need the oauth_verifier, # request_token and request_token secret. The last two # were obtain when you got the authorization url. Vimeo # redirects user to application, passing the oauth_verifier # The oauth_verifier will be obtain after you give access # to your application. my $auth_url = $vimeo_oauth->get_authorization_url(); my $verifier = 'oauth_verifier_code'; $vimeo_oauth->get_access_token( { verifier => $verifier } ); # Now you have your access tokens and do not need to go through # this process every time you make an api request print "Access token: " . $self->access_token . "\n"; print "Accesss token secret: " . $self->access_token_secret . "\n";
Net::Vimeo::OAuth is a perl interface to Vimeo Advanced API
Get the URL needed to authorzie the user. It returns an URI object. When you get this URL it will be generated a request token and a request token secret that will be used later to get access tokens.
URI
Get request tokens that later can be exchanged with access tokens.
In order to use Vimeo Advanced API you will need access tokens. This is the final step in authorizing you app. Given the request tokens and the oauth verifier from get_authorization_url you can exchange it with access tokens.
get_authorization_url
An access_token is the key you get from a user which allows your app to act on behalf of a user. Usually your application will collect an acceess_token by sending the user to a callback, an URL where the user can decide if she grants access or not. Vimeo provides a readily available access_token for your own account on your private developer page where you register your app.
Set the acceee_token with this method. (provided via Net::OAuth)
Set the acceee_token_secret with this method. (provided via Net::OAuth)
Net::Vimeo
Mirela Iclodean, <imirela at cpan.org>
<imirela at cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
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.