HL Connector provides a simplified API interface to Hal Leonard's Digital Asset Management (DAM) system. This API enables vendors to integrate with Hal Leonard's digital content distribution platform to purchase registrations, download, and manage digital sheet music and other media assets
PHP 8.1 and later.
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/HLConnect/hlconnect-php.git"
}
],
"require": {
"HLConnect/hlconnect-php": "*@dev"
}
}Then run composer install
Download the files and include autoload.php:
<?php
require_once('/path/to/HLConnect/vendor/autoload.php');Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: access_token
$config = HLConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new HLConnect\Api\AssetsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$pageSize = 20; // int | Number of assets to return per page
$lastId = 56; // int | The ID of the last asset from the previous page. Used for pagination to retrieve the next page of results.
try {
$result = $apiInstance->assetsList($pageSize, $lastId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AssetsApi->assetsList: ', $e->getMessage(), PHP_EOL;
}All URIs are relative to https://hlconnect-api.mu.se
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AssetsApi | assetsList | GET /assets/list | Retrieve a paginated list of digital assets |
| HealthApi | health | GET /health | Perform system health check |
| PurchaseApi | connectorPurchaseCancel | DELETE /purchase/cancel | Cancel purchase order line item |
| PurchaseApi | connectorPurchaseDownloadUrl | GET /purchase/download-url | Get asset download URL |
| PurchaseApi | connectorPurchaseInfo | GET /purchase/info | Retrieve purchase order information |
| PurchaseApi | connectorPurchaseRegister | POST /purchase/register | Register a new purchase transaction |
| PurchaseApi | connectorPurchaseViewUrl | GET /purchase/view-url | Get asset view URL |
| PurchaseCancelApi | connectorPurchaseCancel | DELETE /purchase/cancel | Cancel purchase order line item |
| PurchaseDownloadUrlApi | connectorPurchaseDownloadUrl | GET /purchase/download-url | Get asset download URL |
| PurchaseInfoApi | connectorPurchaseInfo | GET /purchase/info | Retrieve purchase order information |
| PurchaseRegisterApi | connectorPurchaseRegister | POST /purchase/register | Register a new purchase transaction |
| PurchaseViewUrlApi | connectorPurchaseViewUrl | GET /purchase/view-url | Get asset view URL |
- AssetItem
- AssetPartForm
- AssetsListResponse
- ContributorItem
- DownloadUrl
- ErrorResponse
- HealthItem
- ImageItem
- InstrumentItem
- MedleyAssetItem
- OrderItem
- OrderProcessingFailedResponse
- PackageItem
- PriceItem
- PurchaseInProcessingResponse
- PurchaseRegisterRequest
- RelatedGoodItem
- RenderingItem
- UsergenItem
- ViewUrl
Authentication schemes defined for the API:
- Type: Bearer authentication
To run the tests, use:
composer install
vendor/bin/phpunitThis PHP package is automatically generated by the OpenAPI Generator project:
- API version:
0.2- Package version:
0.0.1 - Generator version:
7.18.0-SNAPSHOT
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen