src/app/modules/public/module/offline/services/electron-dialog/electron-dialog.service.ts
Properties |
|
Methods |
constructor(http: HttpClient, configService: ConfigService)
|
|||||||||
Parameters :
|
showContentExportDialog |
showContentExportDialog()
|
Returns :
any
|
showContentImportDialog |
showContentImportDialog()
|
Returns :
void
|
showContentLocationChangePopup |
showContentLocationChangePopup()
|
Returns :
any
|
showTelemetryExportDialog |
showTelemetryExportDialog()
|
Returns :
any
|
showTelemetryImportDialog |
showTelemetryImportDialog()
|
Returns :
void
|
delete | ||||||||
delete(requestParam: RequestParam)
|
||||||||
Inherited from
DataService
|
||||||||
Defined in
DataService:161
|
||||||||
for making delete api calls
Parameters :
Returns :
Observable<ServerResponse>
|
get | ||||||||
get(requestParam: RequestParam)
|
||||||||
Inherited from
DataService
|
||||||||
Defined in
DataService:82
|
||||||||
for making get api calls
Parameters :
Returns :
Observable<ServerResponse>
|
Private getDateDiff | ||||
getDateDiff(serverdate)
|
||||
Inherited from
DataService
|
||||
Defined in
DataService:234
|
||||
Parameters :
Returns :
number
|
Private getHeader | ||||
getHeader(headers?)
|
||||
Inherited from
DataService
|
||||
Defined in
DataService:196
|
||||
for preparing headers
Parameters :
|
getWithHeaders | ||||||||
getWithHeaders(requestParam: RequestParam)
|
||||||||
Inherited from
DataService
|
||||||||
Defined in
DataService:60
|
||||||||
for making get api calls which needs headers in response headers are fetched to get server time using Date attribute in header
Parameters :
Returns :
Observable<ServerResponse>
|
patch | ||||||||
patch(requestParam: RequestParam)
|
||||||||
Inherited from
DataService
|
||||||||
Defined in
DataService:143
|
||||||||
for making patch api calls
Parameters :
Returns :
Observable<ServerResponse>
|
post | ||||||||
post(requestParam: RequestParam)
|
||||||||
Inherited from
DataService
|
||||||||
Defined in
DataService:123
|
||||||||
for making post api calls
Parameters :
Returns :
Observable<ServerResponse>
|
postWithHeaders | ||||||||
postWithHeaders(requestParam: RequestParam)
|
||||||||
Inherited from
DataService
|
||||||||
Defined in
DataService:102
|
||||||||
for making post api calls with headers in response object
Parameters :
Returns :
Observable<any>
|
put | ||||||||
put(requestParam: RequestParam)
|
||||||||
Inherited from
DataService
|
||||||||
Defined in
DataService:180
|
||||||||
for making PUT api calls
Parameters :
Returns :
Observable<ServerResponse>
|
Public configService |
Type : ConfigService
|
Public http |
Type : HttpClient
|
Inherited from
DataService
|
Defined in
DataService:11
|
appId |
Type : string
|
Inherited from
DataService
|
Defined in
DataService:31
|
Contains appId |
appVersion | ||||
Type : string
|
||||
Inherited from
DataService
|
||||
Defined in
DataService:48
|
||||
Constructor |
||||
Parameters :
|
baseUrl |
Type : string
|
Inherited from
DataService
|
Defined in
DataService:39
|
Contains base Url for api end points |
channelId |
Type : string
|
Inherited from
DataService
|
Defined in
DataService:27
|
Contains channel Id |
deviceId |
Type : string
|
Inherited from
DataService
|
Defined in
DataService:35
|
Contains devoce Id |
rootOrgId |
Type : string
|
Inherited from
DataService
|
Defined in
DataService:23
|
Contains rootOrg Id |
Static sessionId |
Type : string
|
Inherited from
DataService
|
Defined in
DataService:19
|
Static userId |
Type : string
|
Inherited from
DataService
|
Defined in
DataService:18
|
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { ConfigService } from '@sunbird/shared';
import { DataService } from '@sunbird/core';
@Injectable({
providedIn: 'root'
})
export class ElectronDialogService extends DataService {
constructor(public http: HttpClient, public configService: ConfigService) {
super(http);
this.baseUrl = this.configService.urlConFig.URLS.ELECTRON_DIALOG_PREFIX;
}
showContentImportDialog() {
this.get({url : this.configService.urlConFig.URLS.ELECTRON_DIALOG.CONTENT_IMPORT}).subscribe(response => {
console.log('import dialog box opened', response);
}, error => {
console.log('error while showing import dialog box');
});
}
showContentExportDialog() {
return this.get({url : this.configService.urlConFig.URLS.ELECTRON_DIALOG.CONTENT_EXPORT});
}
showTelemetryExportDialog() {
return this.get({url : this.configService.urlConFig.URLS.ELECTRON_DIALOG.TELEMETRY_EXPORT});
}
showTelemetryImportDialog() {
this.get({url : this.configService.urlConFig.URLS.ELECTRON_DIALOG.TELEMETRY_IMPORT}).subscribe(response => {
console.log('telemetry import dialog box opened', response);
}, error => {
console.log('error while telemetry import dialog box ', error);
});
}
showContentLocationChangePopup() {
return this.post({ url: this.configService.urlConFig.URLS.ELECTRON_DIALOG.CONTENT_SUGGEST_LOCATION });
}
}