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
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 0.2
- Package version: 0.0.2
- Generator version: 7.18.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Python 3.9+
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/HLConnect/hlconnect-python.git(you may need to run pip with root permission: sudo pip install git+https://github.com/HLConnect/hlconnect-python.git)
Then import the package:
import hlconnect_clientInstall via Setuptools.
python setup.py install --user(or sudo python setup.py install to install the package for all users)
Then import the package:
import hlconnect_clientExecute pytest to run the tests.
Please follow the installation procedure and then run the following:
import hlconnect_client
from hlconnect_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://hlconnect-api.mu.se
# See configuration.py for a list of all supported configuration parameters.
configuration = hlconnect_client.Configuration(
host = "https://hlconnect-api.mu.se"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: access_token
configuration = hlconnect_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with hlconnect_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hlconnect_client.AssetsApi(api_client)
page_size = 20 # int | Number of assets to return per page (optional) (default to 20)
last_id = 56 # int | The ID of the last asset from the previous page. Used for pagination to retrieve the next page of results. (optional)
try:
# Retrieve a paginated list of digital assets
api_response = api_instance.assets_list(page_size=page_size, last_id=last_id)
print("The response of AssetsApi->assets_list:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling AssetsApi->assets_list: %s\n" % e)All URIs are relative to https://hlconnect-api.mu.se
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AssetsApi | assets_list | GET /assets/list | Retrieve a paginated list of digital assets |
| HealthApi | health | GET /health | Perform system health check |
| PurchaseApi | connector_purchase_cancel | DELETE /purchase/cancel | Cancel purchase order line item |
| PurchaseApi | connector_purchase_download_url | GET /purchase/download-url | Get asset download URL |
| PurchaseApi | connector_purchase_info | GET /purchase/info | Retrieve purchase order information |
| PurchaseApi | connector_purchase_register | POST /purchase/register | Register a new purchase transaction |
| PurchaseApi | connector_purchase_view_url | GET /purchase/view-url | Get asset view URL |
| PurchaseCancelApi | connector_purchase_cancel | DELETE /purchase/cancel | Cancel purchase order line item |
| PurchaseDownloadUrlApi | connector_purchase_download_url | GET /purchase/download-url | Get asset download URL |
| PurchaseInfoApi | connector_purchase_info | GET /purchase/info | Retrieve purchase order information |
| PurchaseRegisterApi | connector_purchase_register | POST /purchase/register | Register a new purchase transaction |
| PurchaseViewUrlApi | connector_purchase_view_url | 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