Acme-Free-API-Stonks
view release on metacpan or search on metacpan
lib/Acme/Free/API/Stonks.pm view on Meta::CPAN
NOW Bearish -0.155 2
MRVL Bullish 0.335 2
GOOG Bearish -0.463 2
EV Bullish 0.077 2
UBS Bearish 0.000 1
TA Bearish 0.000 1
SR Bearish -0.359 1
SIRI Bearish 0.000 1
PANW Bullish 0.660 1
MDB Bullish 0.340 1
FTC Bearish -0.758 1
FAT Bearish 0.000 1
ESTC Bearish 0.000 1
COOL Bullish 0.515 1
CONE Bearish 0.000 1
ATEC Bearish -0.665 1
ABC Bearish -0.563 1
=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> and
L<Dispatch::Fu> 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<stonks>
Object method that returns an ARRAY reference (based on the JSON returned
by this service), that's been give the additional ARRAY vmethods via
L<Util::H2O::More> such as C<< ->all >> (used in the L<SYNOPSIS> above).
=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>'s C<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 ARRAY
refernce of stonks records (HASH refs).
=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.903 second using v1.01-cache-2.11-cpan-75ffa21a3d4 )