GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PITHUB::REPOS::DOWNLOADS (3)

.ds Aq ’

NAME

Pithub::Repos::Downloads - Github v3 Repo Downloads API

CONTENTS

VERSION

version 0.01033

METHODS

    create

o Creating a new download is a two step process. You must first create a new download resource using this call here. After that you take the return Pithub::Result object and call upload to upload the file 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

o Delete a download



    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

o Get a single download



    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

o List downloads for a repository



    GET /repos/:user/:repo/downloads



Examples:



    my $d = Pithub::Repos::Downloads->new;
    my $result = $d->list(
        user => plu,
        repo => Pithub,
    );



    upload

o Upload a file to Amazon S3. See also: create. This will use the ua attribute’s request method to do a POST request to Amazon S3. It requires the Pithub::Result object of a create call to get the necessary data for S3 API call. This method returns an HTTP::Response object directly, not a Pithub::Result object (like all other methods do)! If the upload was successful the status will be 201.

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.

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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 PITHUB::REPOS::DOWNLOADS (3) 2016-01-22

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.