Thanks Meir, this is what I looked for.

... And so a new CPAN module was born: WWW::Github::Files.

:-)
Shmuel.


On Fri, Feb 22, 2013 at 12:55 AM, Meir Kriheli <[email protected]> wrote:

> Hi,
>
> You can use their API:
> http://developer.github.com/v3/repos/contents/#get-contents
>
> For the example given in this thread:
>
> $ curl https://api.github.com/repos/gaal/app-csv/contents/bin
> [
>   {
>     "sha": "55669c67601dc74bf4d751d16f79cd3029fe8508",
>     "size": 5131,
>     "name": "csv",
>     "path": "bin/csv",
>     "type": "file",
>     "url": "https://api.github.com/repos/gaal/app-csv/contents/bin/csv";,
>     "git_url": "
> https://api.github.com/repos/gaal/app-csv/git/blobs/55669c67601dc74bf4d751d16f79cd3029fe8508
> ",
>     "html_url": "https://github.com/gaal/app-csv/blob/master/bin/csv";,
>     "_links": {
>       "self": "https://api.github.com/repos/gaal/app-csv/contents/bin/csv
> ",
>       "git": "
> https://api.github.com/repos/gaal/app-csv/git/blobs/55669c67601dc74bf4d751d16f79cd3029fe8508
> ",
>       "html": "https://github.com/gaal/app-csv/blob/master/bin/csv";
>     }
>   }
> ]
>
>
> Cheers
>
>
> On Thu, Feb 21, 2013 at 5:46 PM, Shmuel Fomberg 
> <[email protected]>wrote:
>
>> Hi Gaal.
>>
>> This give me access to files that I already know exists.
>> What about reading directories?
>> If I remove the 'csv' from the URL, I get 404...
>>
>> Shmuel.
>>
>>
>> On Thu, Feb 21, 2013 at 8:06 PM, Gaal Yahas <[email protected]> wrote:
>>
>>> Pretty trivial filename substitution to make a URL for the raw version,
>>> no?
>>>
>>> E.g., github.com/gaal/app-csv/bin/csv =>
>>> https://raw.github.com/gaal/app-csv/master/bin/csv
>>>
>>> Just use HTTP.
>>>
>>> On Thu, Feb 21, 2013 at 7:24 AM, Shmuel Fomberg <[email protected]
>>> > wrote:
>>>
>>>> Hi all.
>>>>
>>>> Is there a module that let me read files from github respo?
>>>> I see a bunch of API wrappers, such as Net::Github and Pithub, but not
>>>> high-level module.
>>>>
>>>> Shmuel.
>>>>
>>>> _______________________________________________
>>>> Perl mailing list
>>>> [email protected]
>>>> http://mail.perl.org.il/mailman/listinfo/perl
>>>>
>>>
>>>
>>>
>>> --
>>> Gaal Yahas <[email protected]>
>>> http://gaal.livejournal.com/
>>>
>>> _______________________________________________
>>> Perl mailing list
>>> [email protected]
>>> http://mail.perl.org.il/mailman/listinfo/perl
>>>
>>
>>
>> _______________________________________________
>> Perl mailing list
>> [email protected]
>> http://mail.perl.org.il/mailman/listinfo/perl
>>
>
>
>
> --
> Meir Kriheli
> http://meirkriheli.com
>
> _______________________________________________
> Perl mailing list
> [email protected]
> http://mail.perl.org.il/mailman/listinfo/perl
>
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl

Reply via email to