1.0.3 • Published 2 years ago
ovenmediaengine-ts-sdk v1.0.3
Oven Media Engine TypeScript SDK
This SDK provides a TypeScript interface for seamlessly interacting with the Oven Media Engine (OME) REST API.
Installation
Use NPM to install the SDK:
npm install ovenmediaengine-ts-sdkUsage
- Initialization
Import the SDK and initialize it with your OME server's base URL.
import OvenMediaEngineSDK from 'ovenmediaengine-ts-sdk';
const omeSDK = new OvenMediaEngineSDK({ baseURL: 'http://your-ome-server-address:port' });- Authentication
omeSDK.setAuthorization('your_access_token');- Version
omeSDK.setVersion('v1');- Making API Calls
Use the provided methods from the SDK to make calls to the API.
// Example: Fetch the list of Virtual Host
omeSDK.getVirtualHosts().then(response => {
console.log(response.data);
}).catch(error => {
console.error("Error fetching Virtual Host:", error);
});Available Methods
getVirtualHostsGet Virtual Host ListcreateVirtualHostCreate Virtual HostgetVirtualHostGet Virtual Host InformationdeleteVirtualHostDelete Virtual HostreloadAllCertificatesReload All CertificatesreloadAllCertificateReload CertificategetAppsGet Application ListcreateAppCreate ApplicationgetAppGet Application InformationpatchAppPatch Application InformationdeleteAppDelete ApplicationgetOutputProfilesGet Output Profile ListcreateOutputProfileCreate Output ProfilegetOutputProfileGet Output Profile InformationdeleteOutputProfileDelete Output ProfilestartRecordingStart RecordingstopRecordingStop RecordinggetRecordingStateGet Recording StatestartPushPublishingStart Push PublishingstopPushPublishingStop Push PublishinggetPushPublishingStateGet Push Publishing StategetStreamsGet Stream ListcreateStreamCreate Stream (Pull)getStreamGet Stream InfodeleteStreamDelete StreamsendEventSend EventstartDumpStart DumpstopDumpStop DumpgetVirtualHostStatisticsGet Statistics of Virtual HostgetApplicationStatisticsGet Statistics of ApplicationgetStreamStatisticsGet Statistics of Stream
Add further methods here as they get added to the SDK.
Development
To test the SDK during development, use:
npm run devThis will run the sample script located in the samples folder.
Contributions
Contributions are welcome! Please create an issue or pull request for any suggestions or improvements.