.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Pithub::GitData::Blobs 3pm" .TH Pithub::GitData::Blobs 3pm "2023-09-02" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Pithub::GitData::Blobs \- Github v3 Git Data Blobs API .SH "VERSION" .IX Header "VERSION" version 0.01041 .SH "DESCRIPTION" .IX Header "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 \&\f(CW\*(C`utf\-8\*(C'\fR or \f(CW\*(C`base64\*(C'\fR. If your data cannot be losslessly sent as a \s-1UTF\-8\s0 string, you can base64 encode it. .SH "METHODS" .IX Header "METHODS" .SS "create" .IX Subsection "create" .IP "\(bu" 4 Create a Blob .Sp .Vb 1 \& POST /repos/:user/:repo/git/blobs .Ve .Sp Parameters: .RS 4 .IP "\(bu" 4 \&\fBuser\fR: mandatory string .IP "\(bu" 4 \&\fBrepo\fR: mandatory string .IP "\(bu" 4 \&\fBdata\fR: mandatory hashref, having following keys: .RS 4 .IP "\(bu" 4 \&\fBcontent\fR: mandatory string .IP "\(bu" 4 \&\fBencoding\fR: mandatory string, \f(CW\*(C`utf\-8\*(C'\fR or \f(CW\*(C`base64\*(C'\fR .RE .RS 4 .RE .RE .RS 4 .Sp Examples: .Sp .Vb 9 \& my $b = Pithub::GitData::Blobs\->new; \& my $result = $b\->create( \& user => \*(Aqplu\*(Aq, \& repo => \*(AqPithub\*(Aq, \& data => { \& content => \*(AqContent of the blob\*(Aq, \& encoding => \*(Aqutf\-8\*(Aq, \& } \& ); .Ve .Sp Response: \fBStatus: 201 Created\fR .Sp .Vb 3 \& { \& "sha": "3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15" \& } .Ve .RE .SS "get" .IX Subsection "get" .IP "\(bu" 4 Get a Blob .Sp .Vb 1 \& GET /repos/:user/:repo/git/blobs/:sha .Ve .Sp Parameters: .RS 4 .IP "\(bu" 4 \&\fBuser\fR: mandatory string .IP "\(bu" 4 \&\fBrepo\fR: mandatory string .IP "\(bu" 4 \&\fBsha\fR: mandatory string .RE .RS 4 .Sp Examples: .Sp .Vb 6 \& my $b = Pithub::GitData::Blobs\->new; \& my $result = $b\->get( \& user => \*(Aqplu\*(Aq, \& repo => \*(AqPithub\*(Aq, \& sha => \*(Aqb7cdea6830e128bc16c2b75efd99842d971666e2\*(Aq, \& ); .Ve .Sp Response: \fBStatus: 200 \s-1OK\s0\fR .Sp .Vb 4 \& { \& "content": "Content of the blob", \& "encoding": "utf\-8" \& } .Ve .RE .SH "AUTHOR" .IX Header "AUTHOR" Johannes Plunien .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2011 by Johannes Plunien. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.