Catmandu-Store-REST

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
{
   "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" : {

META.yml  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
---
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:

README  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
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,

README  view on Meta::CPAN

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
    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.
 
    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

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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
 
=back
 
=head1 AUTHOR



( run in 1.836 second using v1.01-cache-2.11-cpan-26ccb49234f )