From d3123fb8d854a35bb4cacd632774974c040c3471 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Wed, 15 Jul 2015 16:36:57 +0300 Subject: [PATCH] Improve documentation --- README | 15 ++++++++++++--- lib/WWW/Offliberty.pm | 19 +++++++++++++++---- off | 8 ++++++-- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/README b/README index 5595369..dfe68b4 100644 --- a/README +++ b/README @@ -1,7 +1,16 @@ WWW-Offliberty version 0.002 ============================ -WWW::Offliberty is a simple interface to the offliberty.com download service. +Offliberty is a service that takes a URL to some media (for example a +YouTube video, a Vimeo video, a SoundCloud song) and returns one or +more download links. + +WWW::Offliberty is a simple interface to this service. The dist also +includes a command-line script called "off" that has the same +functionality as the module. + +See http://offliberty.com and the documentation of WWW::Offliberty for +more information. INSTALLATION @@ -17,11 +26,11 @@ DEPENDENCIES This module requires these other modules and libraries: * HTML::TreeBuilder - * LWP::UserAgent + * HTTP::Tiny COPYRIGHT AND LICENCE -Copyright (C) 2013 by Marius Gavrilescu +Copyright (C) 2013-2015 by Marius Gavrilescu This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.18.1 or, diff --git a/lib/WWW/Offliberty.pm b/lib/WWW/Offliberty.pm index f89e0d6..d7a407a 100644 --- a/lib/WWW/Offliberty.pm +++ b/lib/WWW/Offliberty.pm @@ -38,9 +38,20 @@ WWW::Offliberty - interface to offliberty.com download service WWW::Offliberty is a simple interface to the offliberty.com download service. -It exports a single function: B(I, [I => value...]). -This function that returns a list of download links, -as returned by the service. +The module exports (on request) a single function, B(I, +[I => value, ...]). It takes a URL and an optional list of +parameters (key/value pairs). It returns a list of download links. An +empty list is returned if the Offliberty service returns no URLs (for +example if Offliberty encounters an error or the URL is invalid). Dies +if unable to contact Offliberty (for example if there is no internet +connection or a firewall blocks the connection). + +The supported services and parameters are undocumented. From empirical +testing, when requesting a YouTube URL the service will return an +audio-only URL when called with no parameters, and two URLs +(audio-only and audio/video) when called with the parameter +B set to B<1>. In contrast, Vimeo URLs with no parameters +return both audio-only and audio/video variants. =head1 SEE ALSO @@ -52,7 +63,7 @@ Marius Gavrilescu, Emarius@ieval.roE =head1 COPYRIGHT AND LICENSE -Copyright (C) 2013 by Marius Gavrilescu +Copyright (C) 2013-2015 by Marius Gavrilescu This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.18.1 or, diff --git a/off b/off index c4183c0..4633a3a 100755 --- a/off +++ b/off @@ -25,7 +25,11 @@ off - Offliberate this =head1 DESCRIPTION -off is a command-line interface to the offliberty.com download service. It prints a list of download URLs for a given resource (e.g. a youtube video). You can also send parameters using the C<--param> argument. +off is a command-line interface to the offliberty.com download +service. It prints a list of download URLs for a given resource (e.g. +a youtube video). You can also send parameters using the C<--param> +argument. See the L documentation for more +information about parameters. =head1 SEE ALSO @@ -37,7 +41,7 @@ Marius Gavrilescu, Emarius@ieval.roE =head1 COPYRIGHT AND LICENSE -Copyright (C) 2013 by Marius Gavrilescu +Copyright (C) 2013-2015 by Marius Gavrilescu This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.18.1 or, -- 2.39.2