UNPKG

mythtv-services-api

Version:
110 lines 4.71 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MythService = void 0; const CommonTypes_1 = require("./CommonTypes"); const Communication_1 = require("./Communication"); var MythService; (function (MythService) { class Service extends Communication_1.AbstractService { constructor(baseUrl) { super(baseUrl, 'Myth'); } async GetHostName() { return (0, CommonTypes_1.StringGet)(this.serviceProvider, 'GetHostName'); } async GetHosts() { return await (0, CommonTypes_1.StringListGet)(this.serviceProvider, 'GetHosts'); } async GetSetting(req) { return (0, CommonTypes_1.StringGet)(this.serviceProvider, 'GetSetting', req); } async GetFrontends(req) { const value = await this.serviceProvider.get('GetFrontends', req); return value.FrontendList.Frontends; } async AddStorageGroupDir(req) { return (0, CommonTypes_1.BoolPost)(this.serviceProvider, 'AddStorageGroupDir', req); } async BackupDatabase() { return (0, CommonTypes_1.BoolPost)(this.serviceProvider, 'BackupDatabase'); } async ChangePassword(req) { return (0, CommonTypes_1.BoolPost)(this.serviceProvider, 'ChangePassword', req); } async CheckDatabase(req) { return (0, CommonTypes_1.BoolPost)(this.serviceProvider, 'CheckDatabase', req); } async GetBackendInfo() { const value = await this.serviceProvider.get('GetBackendInfo'); return value.BackendInfo; } async GetConnectionInfo(req) { const value = await this.serviceProvider.get('GetConnectionInfo', req); return value.ConnectionInfo; } async GetFormatDate(req) { return (0, CommonTypes_1.StringGet)(this.serviceProvider, 'GetFormatDate', req); } async GetFormatDateTime(req) { return (0, CommonTypes_1.StringGet)(this.serviceProvider, 'GetFormatDateTime', req); } async GetFormatTime(req) { return (0, CommonTypes_1.StringGet)(this.serviceProvider, 'GetFormatTime', req); } async GetKeys() { return (0, CommonTypes_1.StringListGet)(this.serviceProvider, 'GetKeys'); } async GetLogs(req) { const value = await this.serviceProvider.get('GetLogs', req); return value.LogMessageList; } async GetSettingList(req) { const value = await this.serviceProvider.get('GetSettingList', req); return value.SettingList; } async GetStorageGroupDirs(req) { const value = await this.serviceProvider.get('GetStorageGroupDirs', req); return value.StorageGroupDirList.StorageGroupDirs; } async GetTimeZone() { const value = await this.serviceProvider.get('GetTimeZone'); return value.TimeZoneInfo; } async ParseISODateString(req) { const value = await this.serviceProvider.get('ParseISODateString', req); return value.DateTime; } async ProfileText() { return (0, CommonTypes_1.StringGet)(this.serviceProvider, 'ProfileText'); } async ProfileURL() { return (0, CommonTypes_1.StringGet)(this.serviceProvider, 'ProfileURL'); } async ProfileUpdated() { return (0, CommonTypes_1.StringGet)(this.serviceProvider, 'ProfileUpdated'); } async ProfileDelete() { return (0, CommonTypes_1.BoolPost)(this.serviceProvider, 'ProfileDelete'); } async ProfileSubmit() { return (0, CommonTypes_1.BoolPost)(this.serviceProvider, 'ProfileSubmit'); } async PutSetting(req) { return (0, CommonTypes_1.BoolPost)(this.serviceProvider, 'PutSetting', req); } async RemoveStorageGroupDir(req) { return (0, CommonTypes_1.BoolPost)(this.serviceProvider, 'RemoveStorageGroupDir', req); } async SendMessage(req) { return (0, CommonTypes_1.BoolPost)(this.serviceProvider, 'SendMessage', req); } async SendNotification(req) { return (0, CommonTypes_1.BoolPost)(this.serviceProvider, 'SendNotification', req); } async TestDBSettings(req) { return (0, CommonTypes_1.BoolPost)(this.serviceProvider, 'TestDBSettings', req); } } MythService.Service = Service; })(MythService = exports.MythService || (exports.MythService = {})); //# sourceMappingURL=MythService.js.map