Acme-Free-API-Ye
view release on metacpan or search on metacpan
lib/Acme/Free/API/Ye.pm view on Meta::CPAN
use strict;
use warnings;
use Acme::Free::API::Ye qw//;
my $ye = Acme::Free::API::Ye->new;
printf "%s\n", $ye->quote;
=head2 C<ye> Commandline Client
After installing this module, simply run the command C<ye> without any arguments, and it will print
a random Kanye Rest quote to C<STDOUT>.
shell> ye
If I don't scream, if I don't say something then no one's going to say anything.
shell> ye
Culture is the most powerful force in humanity under God
shell>
=head1 DESCRIPTION
Contributed as part of the B<FreePublicPerlAPIs> Project described at,
L<https://github.com/oodler577/FreePublicPerlAPIs>.
This fun module is to demonstrate how to use L<Util::H2O::More> to make
creating easily make API SaaS modules and clients in a clean and idiomatic
way. These kind of APIs tracked at L<https://www.freepublicapis.com/> are
really nice for fun and practice because they don't require dealing with
API keys in the vast majority of cases.
=head1 METHODS
=over 4
=item C<new>
Instantiates object reference. No parameters are accepted.
=item C<quote>
Object method that returns the random Kanye West quote using the Kanye Rest SaaS.
=back
=head2 Internal Methods
=over 4
=item C<get>
Called internally by C<quote>. This method uses L<HTTP::Tiny> to call to the API.
Then L<Util::H2O::More::d2o> is used to deal with the resulting respons that has
an accessor called C<quote>. This is what's invoked that returns the actual quote
string.
=back
=head1 ENVIRONMENT
Nothing special required.
=head1 AUTHOR
Brett Estrade L<< <oodler@cpan.org> >>
=head1 BUGS
Please report.
=head1 LICENSE AND COPYRIGHT
Same as Perl/perl.
( run in 0.959 second using v1.01-cache-2.11-cpan-39bf76dae61 )