The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::Travis::API::Auth::GitHub - Authorize with Travis using a GitHub token

VERSION

version 0.002001

METHODS

get_token_for

Pass a GitHub token and receive a Travis token in exchange, if it is valid.

    my $travis_token = ($class|$instance)->get_token_for(<githubtoken>);

get_authorised_ua_for

Authenticate using a GitHub token and return a Net::Travis::API::UA instance for subsequent requests that will execute requests as authorized by that token.

    if ( my $ua = ($class|$instance)->get_authorized_ua_for( <githubtoken> ) ) {
        pp ( $ua->get('/users')->content_json );
    }

AUTHOR

Kent Fredric <kentnl@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Kent Fredric <kentfredric@gmail.com>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.