Catmandu::Store::CA - Retrieve items from a CollectiveAccess instance
# From the command line catmandu export CA to YAML --id 1234 --username demo --password demo --url http://demo.collectiveaccess.org --model ca_objects --lang nl_NL --field_list 'ca_entities, preferred_labels' # From a Catmandu Fix lookup_in_store( object_id, CA, url: http://demo.collectiveaccess.org, username: demo, password: demo, model: ca_objects, lang: nl_NL, field_list: 'ca_entities, preferred_labels' ) # From Perl code use Catmandu; my $store = Catmandu->store('CA', username => 'demo', password => 'demo', url => 'http://demo.collectiveaccess.org', model => 'ca_objects', lang => 'nl_NL', field_list => 'ca_entities, preferred_labels' )->bag; my $item = $store->get('1234');
A Catmandu::Store::CA is Perl package that can query a CollectiveAccess instance.
url of the CA instance (e.g. http://demo.collectiveaccess.org).
url
Name of a user that can be used to query the API. If you want to store items in the CA instance, it must have the necessary rights.
Password for the user.
The API can access several tables from the CA instance, called model in this module. The model is by default ca_objects, but the following are also supported:
ca_objects
ca_object_lots
ca_entities
ca_places
ca_occurrences
ca_collections
ca_storage_locations
ca_loans
ca_movements
The language (locale) in which to return the data. Set to nl_NL by default, will automatically fall back to en_US if the attribute does not exist in the selected locale. Use the IETF language tag.
nl_NL
en_US
A comma-separated, quoted, ('foo, bar') list of fields that the CollectiveAccess API should return. Is optional and can be left empty to return the default 'summary'.
'foo, bar'
Create a new Catmandu::Store::CA
Retrieve a CA record given an identifier. This returns whatever the CA administrator designated as the "summary" of the record.
Create a new CA record. See here to see what data you must provide to create a record.
Update a new CA record. See here to see what data you must provide to create a record.
Delete (soft delete) a record.
List all items in the instance and iterate over them one at the time. Returns a single object.
Pieter De Praetere <pieter at packed.be>
Copyright 2017- PACKED vzw
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Catmandu Catmandu::Store::VKC Catmandu::CA::API
To install Catmandu::CA, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catmandu::CA
CPAN shell
perl -MCPAN -e shell install Catmandu::CA
For more information on module installation, please visit the detailed CPAN module installation guide.