Acme-Free-Dog-API
view release on metacpan or search on metacpan
"prereqs" : {
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "0"
}
},
"runtime" : {
"requires" : {
"Dispatch::Fu" : "1.06",
"HTTP::Tiny" : "0",
"JSON" : "0",
"Util::H2O::More" : "v0.4.2",
"perl" : "5.010"
}
},
"test" : {
"requires" : {
"Dispatch::Fu" : "1.06",
"HTTP::Tiny" : "0",
"JSON" : "0",
"Test::More" : "0",
"Util::H2O::More" : "v0.4.2",
"perl" : "5.010"
}
}
},
"release_status" : "stable",
"resources" : {
"homepage" : "https://github.com/oodler577/p5-Acme-Free-Dog-API",
"repository" : {
"type" : "git",
"url" : "https://github.com/oodler577/p5-Acme-Free-Dog-API.git",
"web" : "https://github.com/oodler577/p5-Acme-Free-Dog-API"
}
},
"version" : "0.9.10",
"x_generated_by_perl" : "v5.40.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.38",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later"
}
---
abstract: 'Perl API client for the Dog API service, https://dog.ceo/dog-api.'
author:
- 'oodler <oodler@cpan.org>'
build_requires:
Dispatch::Fu: '1.06'
HTTP::Tiny: '0'
JSON: '0'
Test::More: '0'
Util::H2O::More: v0.4.2
perl: '5.010'
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
generated_by: 'Dist::Zilla version 6.032, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: Acme-Free-Dog-API
requires:
Dispatch::Fu: '1.06'
HTTP::Tiny: '0'
JSON: '0'
Util::H2O::More: v0.4.2
perl: '5.010'
resources:
homepage: https://github.com/oodler577/p5-Acme-Free-Dog-API
repository: https://github.com/oodler577/p5-Acme-Free-Dog-API.git
version: 0.9.10
x_generated_by_perl: v5.40.0
x_serialization_backend: 'YAML::Tiny version 1.74'
x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later'
Makefile.PL view on Meta::CPAN
"DISTNAME" => "Acme-Free-Dog-API",
"EXE_FILES" => [
"bin/fletch"
],
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.010",
"NAME" => "Acme::Free::Dog::API",
"PREREQ_PM" => {
"Dispatch::Fu" => "1.06",
"HTTP::Tiny" => 0,
"JSON" => 0,
"Util::H2O::More" => "0.4.2"
},
"TEST_REQUIRES" => {
"Dispatch::Fu" => "1.06",
"HTTP::Tiny" => 0,
"JSON" => 0,
"Test::More" => 0,
"Util::H2O::More" => "0.4.2"
},
"VERSION" => "0.9.10",
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
"Dispatch::Fu" => "1.06",
"HTTP::Tiny" => 0,
"JSON" => 0,
"Test::More" => 0,
"Util::H2O::More" => "0.4.2"
);
unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
delete $WriteMakefileArgs{TEST_REQUIRES};
delete $WriteMakefileArgs{BUILD_REQUIRES};
$WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
}
name = Acme-Free-Dog-API
license = Perl_5
author = oodler <oodler@cpan.org>
copyright_holder = oodler
copyright_year = 2024
[@Basic]
[VersionFromModule]
[MetaJSON]
[GithubMeta]
homesite = https://github.com/oodler577/p5-Acme-Free-Dog-API.git
[KwaliteeTests]
[CheckChangeLog]
[Prereqs]
perl = >= 5.010
Util::H2O::More = >= 0.4.2
HTTP::Tiny = 0
Dispatch::Fu = >= 1.06
JSON = 0
[Prereqs / TestPrereqs]
-phase = test
perl = >= 5.010
Test::More = 0
Util::H2O::More = >= 0.4.2
Dispatch::Fu = >= 1.06
HTTP::Tiny = 0
JSON = 0
[PruneCruft]
[PruneFiles]
filename = .git
filename = releases
[ExecDir]
dir = bin
lib/Acme/Free/Dog/API.pm view on Meta::CPAN
package Acme::Free::Dog::API;
use v5.10;
use strict;
use warnings;
our $VERSION = '0.9.10';
use HTTP::Tiny;
use JSON qw/decode_json/;
use Util::H2O::More qw/baptise ddd HTTPTiny2h2o h2o/;
use constant {
BASEURL => "https://dog.ceo/api",
};
sub new {
my $pkg = shift;
my $self = baptise { ua => HTTP::Tiny->new }, $pkg;
return $self;
lib/Acme/Free/Dog/API.pm view on Meta::CPAN
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.
This module is the first one written using L<Util::H2O::More>'s C<HTTPTiny2h2o>
method that looks for C<JSON> in the C<content> key returned via L<HTTP::Tiny>'s
response C<HASH>.
=head1 METHODS
=over 4
=item C<new>
Instantiates object reference. No parameters are accepted.
( run in 0.689 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )