Download the PHP package kompakt/b3d without Composer
On this page you can find all versions of the php package kompakt/b3d. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package b3d
Kompakt\B3d
Berlin3 Details API Wrapper
Description
Get data from "Details" endpoints, optionally cache results, load full graph per "Details" schema, build canonical product representation and serialize result to xml files.
Installation
Through Composer:
composer require kompakt/b3d
Introduction
The Berlin3 Details software for music businesses provides rudimentary data access in the form of full table dumps. It's up to the user to construct the graph and assemble a data model for further usage. The following entities are available: releases, products, artists, labels, prices, product-tracks, tracks and stock. These entities build up the following structure:
Library Features
- Data fetchers
- Data mappers
- Raw data caching
- In-memory graph loader
- Canonical product builder
- Canonical product serializer
- Extendable event-based architecture
Internally the data is mapped to temporary entity objects. These entities are then wired up by the graphloader. From there the graph is converted to a product-based datastructure in the from of canonical products. This draws a logical border to avoid "Details" interna to leak into your domain.
Fetching
Caching
Populating Entity Repository
Populating from cache:
The individual parts can also be wired up to directly fetch and populate:
Loading the Graph
Building and Serializing Canonical Products
Of course, you don't necessarily need to serialize the canonical products. You could omit XmlSerializerSubscriber
and write your own event listener to directly save the data into a database
Populating Canonical Product Repository from serialized XML
Fetching Stock
Once you have your products in place, you can fetch stocklevels. Be aware that the API returns a maximum of 200 stock items per request:
Passing Orders To Details
Working Examples
cp example/config.php.dist config.php
- Adjust
config.php
as needed
License
kompakt/b3d is licensed under the MIT license - see the LICENSE file for details
All versions of b3d with dependencies
guzzlehttp/guzzle Version ~6.0
kompakt/collection-runner Version ^1.0.0
kompakt/directory-runner Version ^1.1.1
symfony/event-dispatcher Version ~2.8|~3.0|~4.0