Forked from tylerreinhart/toopher-perl-authentication-example.pm
Created
March 10, 2015 20:22
-
-
Save smholloway/5b59f7c18c84041161b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use ToopherAPI | |
# Create an API object using your credentials | |
my $api = new ToopherApi("<your consumer key>", "<your consumer secret>"); | |
# Authenticate a log in | |
my $auth = $api->authenticate($pairing_status->id, "my computer") | |
# Once they've responded you can then check the status | |
my $auth_status = $api->get_authentication_status($auth->id) | |
if (!($auth_status->pending) && $auth_status->granted) { | |
# Success! | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment