Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

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'; # +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?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (1)
As of 2022-01-28 04:56 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (73 votes). Check out past polls.