src/app/manage-learn/core/services/assessment-api.service.ts
Properties |
|
Methods |
constructor(http: HttpClient, toast: ToastService, modalController: ModalController, authService: AuthService, deviceInfo: DeviceInfo, preferences: SharedPreferences, utils: ApiUtilsService, ionicHttp: HTTP, utilityService: UtilityService)
|
||||||||||||||||||||||||||||||
Parameters :
|
checkTokenValidation |
checkTokenValidation()
|
Inherited from
ApiService
|
Defined in
ApiService:70
|
Returns :
Observable<any>
|
delete | ||||||
delete(requestParam: RequestParams)
|
||||||
Inherited from
ApiService
|
||||||
Defined in
ApiService:117
|
||||||
Parameters :
Returns :
Observable<any>
|
get | ||||||
get(requestParam: RequestParams)
|
||||||
Inherited from
ApiService
|
||||||
Defined in
ApiService:51
|
||||||
Parameters :
Returns :
Observable<any>
|
getToken |
getToken()
|
Inherited from
ApiService
|
Defined in
ApiService:95
|
Returns :
void
|
Private handleError | ||||
handleError(result)
|
||||
Inherited from
ApiService
|
||||
Defined in
ApiService:132
|
||||
Parameters :
Returns :
(error: any) => Observable<any>
|
post | ||||||
post(requestParam: RequestParams)
|
||||||
Inherited from
ApiService
|
||||||
Defined in
ApiService:101
|
||||||
Parameters :
Returns :
Observable<any>
|
setHeaders | ||||
setHeaders(session)
|
||||
Inherited from
ApiService
|
||||
Defined in
ApiService:35
|
||||
Parameters :
Returns :
{ Authorization: any; 'x-auth-token': any; 'X-authenticated-user-token': any; 'Content-Type': string; 'X-App-Id': any; deviceId: any; }
|
Public authService |
Type : AuthService
|
Decorators :
@Inject('AUTH_SERVICE')
|
Inherited from
ApiService
|
Defined in
ApiService:21
|
baseUrl |
Type : string
|
Inherited from
ApiService
|
Defined in
ApiService:16
|
Public deviceInfo |
Type : DeviceInfo
|
Decorators :
@Inject('DEVICE_INFO')
|
Inherited from
ApiService
|
Defined in
ApiService:22
|
Public http |
Type : HttpClient
|
Inherited from
ApiService
|
Defined in
ApiService:18
|
Public ionicHttp |
Type : HTTP
|
Inherited from
ApiService
|
Defined in
ApiService:25
|
Public modalController |
Type : ModalController
|
Inherited from
ApiService
|
Defined in
ApiService:20
|
Public preferences |
Type : SharedPreferences
|
Decorators :
@Inject('SHARED_PREFERENCES')
|
Inherited from
ApiService
|
Defined in
ApiService:23
|
Public toast |
Type : ToastService
|
Inherited from
ApiService
|
Defined in
ApiService:19
|
Public apiUtils |
Type : ApiUtilsService
|
Inherited from
ApiService
|
Defined in
ApiService:30
|
authToken |
Inherited from
ApiService
|
Defined in
ApiService:22
|
tokens |
Inherited from
ApiService
|
Defined in
ApiService:21
|
import { HttpClient } from '@angular/common/http';
import { Injectable, Inject } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { ToastService } from '.';
import { urlConstants } from '../constants/urlConstants';
import { ApiService } from './api.service';
import { AuthService, DeviceInfo,SharedPreferences } from 'sunbird-sdk';
import { ApiUtilsService } from './api-utils.service';
import { HTTP } from '@ionic-native/http/ngx';
import { UtilityService } from '@app/services/utility-service';
@Injectable({
providedIn: 'root',
})
export class AssessmentApiService extends ApiService {
baseUrl: string;
constructor(
public http: HttpClient,
public toast: ToastService,
public modalController: ModalController,
@Inject('AUTH_SERVICE') public authService: AuthService,
@Inject('DEVICE_INFO') public deviceInfo: DeviceInfo,
@Inject('SHARED_PREFERENCES') public preferences : SharedPreferences,
private utils: ApiUtilsService,
public ionicHttp:HTTP,
private utilityService: UtilityService,
) {
super(http, toast, modalController, authService, deviceInfo,preferences, utils,ionicHttp);
!this.baseUrl ? this.utilityService.getBuildConfigValue('BASE_URL').then((url) => (this.baseUrl = url)) :'';
}
}