The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

WWW::GitHub::Gist - Perl interface to Gist.GitHub.com

VERSION

Version 0.04

SYNOPSIS

WWW::GitHub::Gist is an object-oriented interface to Gist.GitHub.com.

    use WWW::GitHub::Gist;

    my $gist = WWW::GitHub::Gist->new(id => 'gist id');

    print $gist->info->{'user'}."\n";

    $gist = WWW::GitHub::Gist->new(user => 'username');

    foreach (@{$gist->user}) {
            print $_->{'repo'}."\n";
    }

    $gist = WWW::GitHub::Gist->new(user => 'username', token => 'github token');

    $gist->add_file('test', 'some data here', '.txt');
    $gist->create;

METHODS

new

Create a WWW::GitHub::Gist object

info

Retrieve information about current gist

file( $filename )

Retrieve a file of current gist.

user

Retrieve user's gists

add_file( $filename, $data, $extension )

Add a file to the current gist

create

Create a gist using files added with add_file()

SUBROUTINES

request( $url, $type, $request )

Make an HTTP request and parse the response.

get_request( $url )

Make a GET request.

post_request( $url, %request )

Make a POST request.

parse_response( $data )

Parse the response of an HTTP request.

EXTENSION

The extension variable is used by GitHub to set proper syntax highlighting rules.

GitHub supports the following extensions/languages:

        .txt            Plain Text
        .as             ActionScript
        .c              C
        .cs             C#
        .cpp            C++
        .css            CSS
        .cl             Common Lisp
        .diff           Diff
        .el             Emacs Lisp
        .hrl            Erlang
        .html           HTML
        .hs             Haskell
        .java           Java
        .js             JavaScript
        .lua            Lua
        .m              Objective-C
        .php            PHP
        .pl             Perl
        .py             Python
        .rb             Ruby
        .sql            SQL
        .scala          Scala
        .sls            Scheme
        .tex            TeX
        .xml            XML
        .ascx           ASP
        .scpt           AppleScript
        .arc            Arc
        .asm            Assembly
        .bat            Batchfile
        .befunge        Befunge
        .boo            Boo
        .b              Brainfuck
        .ck             ChucK
        .clj            Clojure
        .coffee         CoffeeScript
        .cfm            ColdFusion
        .feature        Cucumber
        .d              D
        .darcspatch     Darcs Patch
        .pas            Delphi
        .duby           Duby
        .dylan          Dylan
        .e              Eiffel
        .f              FORTRAN
        .s              GAS
        .kid            Genshi
        .ebuild         Gentoo Ebuild
        .eclass         Gentoo Eclass
        .po             Gettext Catalog
        .go             Go
        .man            Groff
        .mustache       HTML+Django
        .erb            HTML+ERB
        .phtml          HTML+PHP
        .hx             HaXe
        .haml           Haml
        .ini            INI
        .weechatlog     IRC log
        .io             Io
        .ll             LLVM
        .mak            Makefile
        .mao            Mako
        .ron            Markdown
        .matlab         Matlab
        .mxt            Max/MSP
        .md             MiniD
        .moo            Moocode
        .myt            Myghty
        .nu             Nu
        .numpy          NumPy
        .ml             OCaml
        .j              Objective-J
        .pir            Parrot Internal Representation
        .pd             Pure Data
        .pytb           Python traceback
        .r              R
        .rhtml          RHTML
        .raw            Raw token data
        .cw             Redcode
        .sass           Sass
        .self           Self
        .sh             Shell
        .st             Smalltalk
        .tpl            Smarty
        .sc             SuperCollider
        .tcl            Tcl
        .tcsh           Tcsh
        .txt            Text
        .vhdl           VHDL
        .v              Verilog
        .vim            VimL
        .bas            Visual Basic
        .yml            YAML
        .jsp            jsp
        .mu             mupad
        .ooc            ooc
        .rst            reStructuredText

AUTHOR

Alessandro Ghedini, <alexbio at cpan.org>

BUGS

Please report any bugs or feature requests to bug-www-github-gist at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-GitHub-Gist. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc WWW::GitHub::Gist

You can also look for information at:

Git repository

http://github.com/AlexBio/WWW-GitHub-Gist

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-GitHub-Gist

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/WWW-GitHub-Gist

* CPAN Ratings

http://cpanratings.perl.org/d/WWW-GitHub-Gist

* Search CPAN

http://search.cpan.org/dist/WWW-GitHub-Gist/

ACKNOWLEDGEMENTS

Gist.GitHub.com APIs are incomplete so many features are not accessible.

LICENSE AND COPYRIGHT

Copyright 2010 Alessandro Ghedini.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

4 POD Errors

The following errors were encountered while parsing the POD:

Around line 359:

Expected text after =item, not a bullet

Around line 363:

Expected text after =item, not a bullet

Around line 367:

Expected text after =item, not a bullet

Around line 371:

Expected text after =item, not a bullet