dev-master
9999999-devPHP client to connect to the Dilicom Hub
WTFPL v2.0
The Requires
The Development Requires
by Julien Fusco
rest http web service ebook onix dilicom
PHP client to connect to the Dilicom Hub
php-dilicom is a PHP client for using the Dilicom Hub., (*2)
Dilicom: http://www.dilicom.net/
Dilicom Hub API: https://hub-dilicom.centprod.com/documentation/, (*3)
# Very simple! $client = new Dilicom\RestClient("MY_GLN", "MY_PASSWORD", Dilicom\RestClient::ENV_PROD); echo $client->getOnixNotice("9782756406053");
Output:, (*4)
<?xml version="1.0" encoding="UTF-8"?><ONIXMessage release="3.0" xmlns="http://www.editeur.org/onix/3.0/reference"> <Header> ... </Header> <Product> <RecordReference>EDEN8564-epub</RecordReference> <NotificationType>02</NotificationType> <ProductIdentifier> <ProductIDType>03</ProductIDType> <IDValue>9782756406053</IDValue> </ProductIdentifier> <DescriptiveDetail> <ProductComposition>00</ProductComposition> <ProductForm>EA</ProductForm> <ProductFormDetail>E101</ProductFormDetail> <ProductFormDetail>E200</ProductFormDetail> <EpubTechnicalProtection>03</EpubTechnicalProtection> <EpubUsageConstraint> <EpubUsageType>02</EpubUsageType> <EpubUsageStatus>03</EpubUsageStatus> </EpubUsageConstraint> <EpubUsageConstraint> <EpubUsageType>03</EpubUsageType> <EpubUsageStatus>03</EpubUsageStatus> </EpubUsageConstraint> <EpubUsageConstraint> <EpubUsageType>04</EpubUsageType> <EpubUsageStatus>02</EpubUsageStatus> <EpubUsageLimit> <Quantity>6</Quantity> <EpubUsageUnit>06</EpubUsageUnit> </EpubUsageLimit> </EpubUsageConstraint> <TitleDetail> <TitleType>01</TitleType> <TitleElement> <TitleElementLevel>01</TitleElementLevel> <TitleText>L'Apprenti assassin</TitleText>
The recommended way to install php-dilicom is through Composer., (*5)
# Install Composer curl -sS https://getcomposer.org/installer | php # Add php-dilicom as a dependency php composer.phar require pkoin/php-dilicom:dev-master
After installing, you need to require Composer's autoloader:, (*6)
require 'vendor/autoload.php';
php-dilicom uses Atoum for unit testing.
In order to run the unit tests, you'll first need to install the dependencies of the project using Composer: php composer.phar install --dev
.
You can then run the tests using vendor/bin/atoum -bf tests/unit/bootstrap.php -d tests/unit
., (*7)
Under the WTFPL v2.0, (*8)
PHP client to connect to the Dilicom Hub
WTFPL v2.0
rest http web service ebook onix dilicom