NAME
Acme::Free::API::Ye - Perl API client for the Kanye Rest Quote API service, https://kanye.rest/.
This module provides the client, "ye", that is available via PATH
after install.
SYNOPSIS
#!/usr/bin/env perl
use strict;
use warnings;
use Acme::Free::API::Ye qw//;
my $ye = Acme::Free::API::Ye->new;
printf "%s\n", $ye->quote;
ye
Commandline Client
After installing this module, simply run the command ye
without any arguments, and it will print a random Kanye Rest quote to 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>
DESCRIPTION
Contributed as part of the FreePublicPerlAPIs Project described at, https://github.com/oodler577/FreePublicPerlAPIs.
This fun module is to demonstrate how to use 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 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.
METHODS
new
-
Instantiates object reference. No parameters are accepted.
quote
-
Object method that returns the random Kanye West quote using the Kanye Rest SaaS.
Internal Methods
get
-
Called internally by
quote
. This method uses HTTP::Tiny to call to the API. Then Util::H2O::More::d2o is used to deal with the resulting respons that has an accessor calledquote
. This is what's invoked that returns the actual quote string.
ENVIRONMENT
Nothing special required.
AUTHOR
Brett Estrade <oodler@cpan.org>
BUGS
Please report.
LICENSE AND COPYRIGHT
Same as Perl/perl.