http://qs321.pair.com?node_id=11128654


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)