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::GITDATA::BLOBS (3)

.ds Aq ’

NAME

Pithub::GitData::Blobs - Github v3 Git Data Blobs API

CONTENTS

VERSION

version 0.01033

DESCRIPTION

Since blobs can be any arbitrary binary data, the input and responses for the blob api takes an encoding parameter that can be either utf-8 or base64. If your data cannot be losslessly sent as a UTF-8 string, you can base64 encode it.

METHODS

    create

o Create a Blob



    POST /repos/:user/:repo/git/blobs



Parameters:
o <B>userB>: mandatory string
o <B>repoB>: mandatory string
o <B>dataB>: mandatory hashref, having following keys:
o <B>contentB>: mandatory string
o <B>encodingB>: mandatory string, utf-8 or base64

Examples:



    my $b = Pithub::GitData::Blobs->new;
    my $result = $b->create(
        user => plu,
        repo => Pithub,
        data => {
            content  => Content of the blob,
            encoding => utf-8,
        }
    );



Response: <B>Status: 201 CreatedB>



    {
        "sha": "3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15"
    }



    get

o Get a Blob



    GET /repos/:user/:repo/git/blobs/:sha



Parameters:
o <B>userB>: mandatory string
o <B>repoB>: mandatory string
o <B>shaB>: mandatory string

Examples:



    my $b = Pithub::GitData::Blobs->new;
    my $result = $b->get(
        user => plu,
        repo => Pithub,
        sha  => b7cdea6830e128bc16c2b75efd99842d971666e2,
    );



Response: <B>Status: 200 OKB>



    {
        "content": "Content of the blob",
        "encoding": "utf-8"
    }



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::GITDATA::BLOBS (3) 2016-01-22

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