Catmandu-Store-REST
view release on metacpan or search on metacpan
{
"abstract" : "Store/retrieve items from a JSON REST-API endpoint",
"author" : [
"Pieter De Praetere <pieter@packed.be>"
],
"dynamic_config" : 0,
"generated_by" : "Dist::Milla version v1.0.17, Dist::Zilla version 6.009, CPAN::Meta::Converter version 2.150010",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
---
abstract: 'Store/retrieve items from a JSON REST-API endpoint'
author:
- 'Pieter De Praetere <pieter@packed.be>'
build_requires:
Test::More: '0.96'
configure_requires:
Module::Build::Tiny: '0.034'
dynamic_config: 0
generated_by: 'Dist::Milla version v1.0.17, Dist::Zilla version 6.009, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
NAME
Catmandu::Store::REST - Store/retrieve items from a JSON REST-API
endpoint
SYNOPSIS
# From the command line
$ catmandu export REST --id 1234 --base_url https://www.example.org/api/v1/books --query_string /page/1 to YAML
# From a Catmandu Fix
lookup_in_store(
book_id,
REST,
and the API must accept JSON for PUT/POST requests. The URL must be of
the format [base_url]/[id][query_string], where the id is absent for
POST requests.
PARAMETERS
You must provide the base_url parameter.
base_url
base url of the API endpoint (the entire url before the ID) (e.g.
https://www.example.org/api/v1/books).
query_string
an optional query string that comes behind the ID (e.g. /page/1 where
the complete URL is https://www.example.org/api/v1/books/1/page/1).
AUTHOR
Pieter De Praetere <pieter@packed.be>
lib/Catmandu/Store/REST.pm view on Meta::CPAN
has query_string => (is => 'ro', default => sub { return ''; });
# TODO: support basic authentication
1;
__END__
=encoding utf-8
=head1 NAME
Catmandu::Store::REST - Store/retrieve items from a JSON REST-API endpoint
=head1 SYNOPSIS
# From the command line
$ catmandu export REST --id 1234 --base_url https://www.example.org/api/v1/books --query_string /page/1 to YAML
# From a Catmandu Fix
lookup_in_store(
book_id,
REST,
lib/Catmandu/Store/REST.pm view on Meta::CPAN
is absent for C<POST> requests.
=head1 PARAMETERS
You must provide the C<base_url> parameter.
=over
=item C<base_url>
base url of the API endpoint (the entire url before the ID) (e.g. I<https://www.example.org/api/v1/books>).
=item C<query_string>
an optional query string that comes behind the ID (e.g. I</page/1> where the complete URL is
I<https://www.example.org/api/v1/books/1/page/1>).
=back
=head1 AUTHOR
( run in 0.318 second using v1.01-cache-2.11-cpan-27979f6cc8f )