WebService::GitHub
WebService-GitHub
A wrapper for the GitHub REST API.
SYNOPSIS
use WebService::GitHub;
my $gh = WebService::GitHub.new(
access-token => 'my-access-token'
);
my $res = $gh.request('/user');
say $res.data.name;TODO
Patches welcome
Handle Errors
Auto Pagination
API Throttle
Setup
Authentication
One can order the library to authenticate using one of three different ways. Depending on which way you choose you need to pass a different set of arguments to the constructor:
auth_login&auth_tokenOAuth token authenticaation.patPersonal Access Token authentication.app-authandinstall-idApplication authentication. First construct aWebService::GitHub::AppAuthpassing apem-fileor apemstring to its constructor. then pass it asapp-authto theWebService::GitHubconstructor.
Other constructor arguments
endpointUseful for GitHub Enterprise. Default to https://api.github.comper_pagefrom Doc, default to 30, max to 100.jsonp_callbackJSONP Callbacktime-zoneUTC by default, DocwithBuilds the object with a particular rolemy $gh = WebService::GitHub.new( with => ('Debug') );
Response
is-successDid it succeed?rawHTTP::Response instancedataJSON decoded dataheader(Str $field)Get header of HTTP Responsefirst-page-url,prev-page-url,next-page-url,last-page-urlParsed from the Link header, Docx-ratelimit-limit,x-ratelimit-remaining,x-ratelimit-resetRate Limit