1.0.2 • Published 8 years ago
welkin-core v1.0.2
Installation
$ npm i welkin-coreUsage
Search for a suitable welkin-bundle.js adapter on Github.
const { ProviderService } = require('welkin-core');
const providerService = new ProviderService();
providerService.search('orf', (bundleDataObjects) => {
//
});Get all installed providers.
const { ProviderService } = require('welkin-core');
const providerService = new ProviderService();
const bundleDataObject = "Replace me with a BundleDataObject";
providerService.all((bundleDataObjects) => {
//
});Install a provider by a BundleDataObject.
const { ProviderService } = require('welkin-core');
const providerService = new ProviderService();
const bundleDataObject = "Replace me with a BundleDataObject";
providerService.install(bundleDataObject, (success, errorMessage) => {
//
});Uninstall a provider by a RepositoryDataObject.
const { ProviderService } = require('welkin-core');
const providerService = new ProviderService();
const bundleDataObject = "Replace me with a BundleDataObject";
providerService.uninstall(bundleDataObject, (success, errorMessage) => {
//
});Get executable of BundleDataObject.
const { ProviderService } = require('welkin-core');
const providerService = new ProviderService();
const bundleDataObject = "Replace me with a BundleDataObject";
const providerExecutable = providerService.buildInstance(bundleDataObject);
providerExecutable.series('abc', (series) => {
providerExecutable.shows(series[0], (shows) => {
console.log(shows[0]);
providerExecutable.stream(shows[0], (streams) => {
for (let i in streams) {
console.log(streams[i].videos);
break;
}
});
});
});