Skip to content

PACKED-vzw/Catmandu-Store-REST

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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,
  base_url: https://www.example.org/api/v1/books,
  query_string: /page/1
)

DESCRIPTION

# From a Catmandu Fix
lookup_in_store(
  book_id,
  REST,
  base_url: https://www.example.org/api/v1/books,
  query_string: /page/1
)

Uses a RESTful API as a Catmandu::Store.

The module allows you to use a RESTful API that uses JSON as data format and uses the URL format [base_url]/[id][query_string] as a Store for Catmandu.

Retrieving (GET), adding (POST), updating (PUT) and deleting (DELETE) single items is supported. Data must be provided as JSON by the API, 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.

AUTHOR

Pieter De Praetere pieter@packed.be

COPYRIGHT

Copyright 2017- PACKED vzw

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

About

Store/retrieve items from a JSON REST-API endpoint.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages