Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: How to access github with Pithub/Net::GitHub::V3?

by tobyink (Canon)
on Feb 22, 2021 at 10:16 UTC ( #11128654=note: print w/replies, xml ) Need Help??


in reply to How to access github with Pithub/Net::GitHub::V3?

This works for me and shows all my repos, including private repos.

#!/usr/bin/env perl use strict; use warnings; use feature 'say'; use Pithub; use constant GH_USER => 'tobyink'; # Your username! use constant GH_TOKEN => 'ABCX123'; # https://github.com/settings/toke +ns my $gh = 'Pithub'->new( user => GH_USER, token => GH_TOKEN, ); my $repos = $gh->repos->list; $repos->auto_pagination( 1 ); while ( my $repo = $repos->next ) { say $repo->{'name'}; }

Replies are listed 'Best First'.
Re^2: How to access github with Pithub/Net::GitHub::V3?
by no longer just digit (Beadle) on Feb 22, 2021 at 12:40 UTC
    I've been able to access passive information but every attempt to change something using the API gets these "Not Found" errors.
      Have you configured the "Scopes" of the token to allow that kind of access?

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
        That was the problem. Thank you.

      Are you using the latest release of Pithub? Github do occasionally move bits of their API around not too often, but if it's a very old Pithub, that could be an issue.

        Yes, I installed it yesterday.

        $ cpanm Pithub Pithub is up to date. (0.01036)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11128654]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2021-10-17 00:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (70 votes). Check out past polls.

    Notices?