Pithub...nloads(3pm)
β¨ NAME β¨
Pithub::Repos::Downloads β the Github v3 Repo Downloads API, bestie π
πΈ VERSION πΈ
version 0.01043 β yes she's got a number, she's official π
π METHODS π
π create
okay so creating a new download is a whole two step process, she's high maintenance like that:
- You gotta first create a new download resource using this call right here.
- Then you take the
Pithub::Resultobject she hands back and call"upload"to actually push the file up to Amazon S3.
POST /repos/:user/:repo/downloads
Examples:
my $d = Pithub::Repos::Downloads->new;
my $result = $d->create(
user => 'plu',
repo => 'Pithub',
data => {
name => 'new_file.jpg',
size => 114034,
description => 'Latest release',
content_type => 'text/plain',
},
);
$d->upload(
result => $result,
file => '/path/to/file',
);
π¦ delete
Delete a download, it's giving cleanup era π§Ήβ¨
DELETE /repos/:user/:repo/downloads/:id
Examples:
my $d = Pithub::Repos::Downloads->new;
my $result = $d->delete(
user => 'plu',
repo => 'Pithub',
download_id => 1,
);
π get
Get a single download, one (1) download, main character only π
GET /repos/:user/:repo/downloads/:id
Examples:
my $d = Pithub::Repos::Downloads->new;
my $result = $d->get(
user => 'plu',
repo => 'Pithub',
download_id => 1,
);
β list
List downloads for a repository β the whole squad, no gatekeeping π«Ά
GET /repos/:user/:repo/downloads
Examples:
my $d = Pithub::Repos::Downloads->new;
my $result = $d->list(
user => 'plu',
repo => 'Pithub',
);
π₯ upload
Upload a file to Amazon S3. See also: "create". This one will use the "ua" attribute's "request" method to do a POST request to Amazon S3. It requires the Pithub::Result object from a "create" call to get the necessary data for the S3 API call.
NOT ME RETURNING A DIFFERENT TYPE THAN EVERYONE ELSE π This method returns anHTTP::Responseobject directly, not aPithub::Resultobject (like all the other methods do)! If the upload was successful the status will be201. Periodt.
π NOTE π
Github says: the Downloads API (described below) was deprecated on December 11, 2012. It will be removed at a future date. We recommend using Pithub::Repos::Releases instead.
fr fr bestie, this API is giving expired milk, go use the recommended one π
π AUTHOR π
Johannes Plunien <plu@cpan.org>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2011 by Johannes Plunien.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
okay that's the whole page, no cap πΈ written by perl v5.40.1 and dated 2025-06-08 β she's iconic, she's copyrighted, she's out π β¨
π¦ where this page comes from
- debian trixie: libpithub-perl 0.01043-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libpithub-perl 0.01043-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libpithub-perl 0.01043-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms