API-Client
view release on metacpan or search on metacpan
lib/API/Client.pm view on Meta::CPAN
=over 4
=item process example #1
# given: synopsis
require Mojo::UserAgent;
require Mojo::Transaction::HTTP;
$client->process(
Mojo::UserAgent->new,
Mojo::Transaction::HTTP->new
);
=back
=cut
=head2 resource
resource(Str @segments) : Object
The resource method returns a new instance of the object for the API resource
endpoint specified.
=over 4
=item resource example #1
# given: synopsis
$client->resource('status', 200);
=back
=cut
=head2 serialize
serialize() : HashRef
The serialize method serializes and returns the object as a C<hashref>.
=over 4
=item serialize example #1
# given: synopsis
$client->serialize;
=back
=cut
=head2 update
update(Any %args) : InstanceOf["Mojo::Transaction"]
The update method issues a C<PUT> request to the API resource represented by
the object.
=over 4
=item update example #1
# given: synopsis
$client->resource('put')->update(
json => {active => 1}
);
=back
=cut
=head1 AUTHOR
Al Newkirk, C<awncorp@cpan.org>
=head1 LICENSE
Copyright (C) 2011-2019, Al Newkirk, et al.
This is free software; you can redistribute it and/or modify it under the terms
of the The Apache License, Version 2.0, as elucidated in the L<"license
file"|https://github.com/iamalnewkirk/api-client/blob/master/LICENSE>.
=head1 PROJECT
L<Wiki|https://github.com/iamalnewkirk/api-client/wiki>
L<Project|https://github.com/iamalnewkirk/api-client>
L<Initiatives|https://github.com/iamalnewkirk/api-client/projects>
L<Milestones|https://github.com/iamalnewkirk/api-client/milestones>
L<Contributing|https://github.com/iamalnewkirk/api-client/blob/master/CONTRIBUTE.md>
L<Issues|https://github.com/iamalnewkirk/api-client/issues>
=cut
( run in 2.934 seconds using v1.01-cache-2.11-cpan-140bd7fdf52 )