Symfony bundle provides API endpoints communication with ALMA
GitHub | Packagist | Frontend Application
DISCLAIMER: This bundle needs a specific ALMA configuration to work. Please contact [email protected] for more information.
This Symfony 4.4 bundle provides API endpoints for
for the API-Gateway.
There is a corresponding frontend application that uses this API at Sublibrary Frontend Application.
You can install the bundle directly from packagist.org.
composer require dbp/relay-sublibrary-bundle
config/bundles.php
:...
Dbp\Relay\SublibraryBundle\DbpRelaySublibraryBundle::class => ['all' => true],
Dbp\Relay\CoreBundle\DbpRelayCoreBundle::class => ['all' => true],
];
composer install
to clear cachesThe bundle has configuration values that you can specify in your app, either by hardcoding it, or by referencing an environment variable.
For this create config/packages/dbp_relay_sublibrary.yaml
in the app with the following
content:
dbp_relay_sublibrary:
api_url: '%env(ALMA_API_URL)%'
api_key: '%env(ALMA_API_KEY)%'
analytics_api_key: '%env(ALMA_ANALYTICS_API_KEY)%'
readonly: '%env(bool:ALMA_READONLY)%'
Your .env
file should then contain the following environment variables you need to configure the bundle:
###> dbp/relay-sublibrary-bundle ###
ALMA_API_URL=https://api-eu.hosted.exlibrisgroup.com/almaws/v1
ALMA_API_KEY=
ALMA_ANALYTICS_API_KEY=
ALMA_READONLY=
###< dbp/relay-sublibrary-bundle ###
If you were using the DBP API Server Template as template for your Symfony application, then the configuration files should have already been generated for you.
For more info on bundle configuration see https://symfony.com/doc/current/bundles/configuration.html.