https://github.com/kentnl/net-travis-api
Low Level Plumbing for travis-ci.org's api
https://github.com/kentnl/net-travis-api
perl
Last synced: 4 months ago
JSON representation
Low Level Plumbing for travis-ci.org's api
- Host: GitHub
- URL: https://github.com/kentnl/net-travis-api
- Owner: kentnl
- License: other
- Created: 2014-02-13T16:33:31.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2016-04-27T14:19:27.000Z (over 9 years ago)
- Last Synced: 2025-02-26T22:44:54.206Z (11 months ago)
- Topics: perl
- Language: Perl
- Size: 132 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.mkdn
- Changelog: Changes
- Contributing: CONTRIBUTING.pod
- License: LICENSE
Awesome Lists containing this project
README
# NAME
Net::Travis::API - Low Level Plumbing for travis-ci.org's api
# VERSION
version 0.002001
# DEVELOPMENT
This code is highly in-development, and is feature incomplete, and does not presently represent all API functions available.
At present, most the functionality is lower-level plumbing functions which should eventually give way to a higher level API.
But code endeavors to approach better coverage eventually, and hopefully serve as a better documentation than Travis's own API
docs, which were so lackluster I had to resort to sniffing their websites traffic from my browser to understand what was going
on.
# AUTHENTICATION
Presently this module only covers the overhead of getting authentication working with travis, so that you can do arbitrary
requests and get useful responses.
And this was the #1 challenge from the Travis API docs, because this process is poorly documented, and fettered with
documentation about things documented not to be implemented yet.
So, at present, you have several options:
- 1. Work with an unauthenticated User Agent.
use Net::Travis::API::UA;
my $ua = Net::Travis::API::UA->new();
$ua->get('/repos/someuser'); # Public Endpoint
- 2. Use the GitHub Authentication Module to get an authenticated agent.
use Net::Travis::API::Auth::GitHub;
my $ua = Net::Travis::API::Auth::GitHub->get_authorised_ua_for( $token );
$ua->get('/users'); # private endpoint
- 3. Get an authorization token some other way.
And avoid incurring an authorization request overhead.
use Net::Travis::API::UA;
my $ua = Net::Travis::API::UA->new(
authtokens => [ $token ]
);
$ua->get('/users'); # private endpoint
# AUTHOR
Kent Fredric <kentnl@cpan.org>
# COPYRIGHT AND LICENSE
This software is copyright (c) 2016 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.