The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Catmandu::Store::VKC - Retrieve items from the CollectiveAccess instance of the VKC

SYNOPSIS

    # From the command line
    catmandu export VKC to YAML --id 1234 --username demo --password demo  --model ca_objects --lang nl_NL --field_list 'ca_entities, preferred_labels'

    # From a Catmandu Fix
    lookup_in_store(
      object_id,
      VKC,
      username: demo,
      password: demo,
      lang: nl_NL,
      model: ca_objects,
      field_list: 'ca_entities, preferred_labels'
    )

    # From Perl code
    use Catmandu;

    my $store = Catmandu->store('CA',
        username   => 'demo',
        password   => 'demo',
        lang       => 'nl_NL',
        model      => ca_objects,
        field_list =>'ca_entities, preferred_labels'
    )->bag;

    my $item = $store->get('1234');

DESCRIPTION

A Catmandu::Store::VKC is Perl package that can query the CollectiveAccess instance of the VKC. It functions identically to Catmandu::Store::CA, but does not require the url parameter to be set.

CONFIGURATION

username

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

Password for the user.

lang

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.

field_list

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'.

METHODS

new(%configuration)

Create a new Catmandu::Store::VKC

get($id)

Retrieve a CA record given an identifier. This returns whatever the CA administrator designated as the "summary" of the record.

add($data)

Create a new CA record. See here to see what data you must provide to create a record.

update($id, $data)

Update a new CA record. See here to see what data you must provide to create a record.

delete($id)

Delete (soft delete) a record.

each()

Not supported

AUTHOR

Pieter De Praetere <pieter at 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

Catmandu Catmandu::Store::CA Catmandu::CA::API