NAME
Datahub::Factory::Importer::Datahub - Import items from a Datahub instance
SYNOPSIS
use Datahub::Factory;
my $datahub_options = {
datahub_url => 'https://www.datahub.be',
oauth_client_id => 'mydatahub',
oauth_client_secret => 'thedatahub',
oauth_username => 'datahub',
oauth_password => 'adatahub'
};
my $importer = Datahub::Factory->importer('Datahub')->new($datahub_options);
$importer->importer->each(sub {
my $item = shift;
print Dumper($item);
});
DESCRIPTION
This module imports records from a Datahub instance.
PARAMETERS
datahub_url
-
URL where the Datahub resides. This URL is the base URL of the datahub, not the API url. The module will create the correct API URL automatically. Required.
oauth_client_id
-
OAuth 2 client ID. Required.
oauth_client_secret
-
OAuth2 client secret. Required.
oauth_username
-
Datahub username. Required.
oauth_password
-
Datahub password. Required.
ATTRIBUTES
importer
-
A Importer that can be used in your script.
AUTHORS
Pieter De Praetere <pieter@packed.be>
Matthias Vandermaesen <matthias.vandermaesen@vlaamsekunstcollectie.be>
COPYRIGHT
Copyright 2017 - PACKED vzw, Vlaamse Kunstcollectie vzw
LICENSE
This library is free software; you can redistribute it and/or modify it under the terms of the GPLv3.