Pithub...:Assets(3pm)

πŸ“¦
version 0.01043 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

✨ Pithub::Repos::Releases::Assets ✨

okay bestie, so like… this is the module for the Github v3 Repo Releases Assets API πŸŽ€ like, all the little files you attach to a release? yeah those. it's Pithub::Repos::Releases::Assets and it's giving very much "yes I handle your zip files" energy πŸ’…


🌸 VERSION 🌸

version 0.01043 β€” she's got a number, she's official 🫢


πŸ’– METHODS πŸ’–

🌈 create

  • Upload a release asset. literally just yeeting a file up there ✨
POST https://uploads.github.com/repos/:owner/:repo/releases/:id/assets?name=foo.zip

Examples:

my $a = Pithub::Repos::Releases::Assets->new;
my $result = $a->create(
    repo         => 'graylog2-server',
    user         => 'Graylog2',
    release_id   => 81148,
    name         => 'Some Asset',
    data         => 'the asset data',
    content_type => 'text/plain',
);

like look at that content_type sitting there being all 'text/plain'… iconic honestly 🌟


🌈 delete

  • Delete a release asset. bye bye asset, no cap, she's gone πŸ’€
DELETE /repos/:owner/:repo/releases/assets/:id

Examples:

my $a = Pithub::Repos::Releases::Assets->new;
my $result = $a->delete(
    repo     => 'graylog2-server',
    user     => 'Graylog2',
    asset_id => 81148,
);

🌈 get

  • Get a single release asset. one (1) asset, just the one, she's the main character πŸ‘‘
GET /repos/:owner/:repo/releases/assets/:id

Examples:

my $a = Pithub::Repos::Releases::Assets->new;
my $result = $a->get(
    repo     => 'graylog2-server',
    user     => 'Graylog2',
    asset_id => 81148,
);

🌈 list

  • List assets for a release. all of them. every single one. the whole girl group πŸ¦‹
GET /repos/:owner/:repo/releases/:id/assets

Examples:

my $a = Pithub::Repos::Releases::Assets->new;
my $result = $a->list(
    repo       => 'graylog2-server',
    user       => 'Graylog2',
    release_id => 198110,
);
⚠️ heads up bestie, list takes release_id while get, delete and update take asset_id β€” different ids, don't mix them up 😭

🌈 update

  • Edit a release asset. little glow-up, change the name, change the label, slay πŸ’…
PATCH /repos/:owner/:repo/releases/assets/:id

Examples:

my $a = Pithub::Repos::Releases::Assets->new;
my $result = $a->update(
    repo     => 'graylog2-server',
    user     => 'Graylog2',
    asset_id => 81148,
    data     => {
        name  => 'Some Name',
        label => 'Some Label',
    }
);

🧚 AUTHOR 🧚

Johannes Plunien <plu@cpan.org> β€” the legend, the icon, the moment 🌟


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. 🫢 like, go off, do whatever, it's free fr fr


and that's the whole page bestie!! πŸ“ this was perl v5.40.1, dated 2025-06-08, from the Pithub...:Assets(3pm) era β€” mwah, no notes, periodt πŸ’–βœ¨

πŸ“¦ where this page comes from