Constructor
new DataProvider(hostNameopt)
Creates an instance of DataProvider.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
hostName | string | <optional> | 'il.srgssr.ch' | The base host name for constructing URLs |
Methods
handleRequest(urlHandler) → {Promise.<MediaComposition>}
Handles requests by constructing URLs and fetching data.
This provides unified error handling, regardless of the urlHandler used.
Parameters:
Name | Type | Description |
---|---|---|
urlHandler | function | A function that constructs the URL |
Returns:
A promise with the fetched data
- Type:
- Promise.<MediaComposition>
mediaCompositionUrlHandler(urn) → {string}
Gets the media composition URL by URN.
Parameters:
Name | Type | Description |
---|---|---|
urn | string | The URN for the media composition |
Returns:
The constructed URL
- Type:
- string
setIlHost(hostName)
Sets the integration layer host name.
Parameters:
Name | Type | Description |
---|---|---|
hostName | string | The host name to set |