HL Connect 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
);
try {
$result = $apiInstance->assetsCategories();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AssetsApi->assetsCategories: ', $e->getMessage(), PHP_EOL;
}All URIs are relative to https://hlconnect-api.mu.se
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AssetsApi | assetsCategories | GET /assets/categories | Retrieve the list of available asset categories |
| AssetsApi | assetsList | GET /assets/list | Retrieve a paginated list of digital assets |
| AssetsApi | assetsSearch | POST /assets/search | Search assets |
| AssetsCategoriesApi | assetsCategories | GET /assets/categories | Retrieve the list of available asset categories |
| AssetsHistoryApi | assetsHistory | POST /assets/history | Retrieve asset history events |
| AssetsListApi | assetsList | GET /assets/list | Retrieve a paginated list of digital assets |
| AssetsSearchApi | assetsSearch | POST /assets/search | Search 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 | connectorPurchaseValidatePurchaseBeforePayment | POST /purchase/validate-purchase-before-payment | Validate purchase before payment |
| 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 |
| PurchaseValidationApi | connectorPurchaseValidatePurchaseBeforePayment | POST /purchase/validate-purchase-before-payment | Validate purchase before payment |
| PurchaseViewUrlApi | connectorPurchaseViewUrl | GET /purchase/view-url | Get asset view URL |
- AssetItem
- AssetPartForm
- AssetsHistoryRequest
- AssetsHistoryResponse
- AssetsListResponse
- AssetsSearchRequest
- AssetsSearchResponse
- CategoriesListResponse
- CategoryItem
- ContributorItem
- DownloadUrl
- ErrorResponse
- HealthItem
- HistoryEventItem
- ImageItem
- InstrumentItem
- KeySignatureItem
- MedleyAssetItem
- OrderItem
- OrderProcessingFailedResponse
- PackageItem
- PriceItem
- PurchaseInProcessingResponse
- PurchaseRegisterRequest
- PurchaseValidateBeforePaymentRequest
- RelatedGoodItem
- RenderingItem
- UsergenItem
- ValidationToken
- 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.3- Package version:
0.2.0 - Generator version:
7.20.0
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen