File

src/app/manage-learn/core/services/kendra-api.service.ts

Extends

ApiService

Index

Properties
Methods

Constructor

constructor(http: HttpClient, toast: ToastService, modalController: ModalController, authService: AuthService, deviceInfo: DeviceInfo, preferences: SharedPreferences, utils: ApiUtilsService, utilityService: UtilityService, ionicHttp: HTTP)
Parameters :
Name Type Optional
http HttpClient No
toast ToastService No
modalController ModalController No
authService AuthService No
deviceInfo DeviceInfo No
preferences SharedPreferences No
utils ApiUtilsService No
utilityService UtilityService No
ionicHttp HTTP No

Methods

checkTokenValidation
checkTokenValidation()
Inherited from ApiService
Defined in ApiService:70
Returns : Observable<any>
delete
delete(requestParam: RequestParams)
Inherited from ApiService
Defined in ApiService:117
Parameters :
Name Type Optional
requestParam RequestParams No
Returns : Observable<any>
get
get(requestParam: RequestParams)
Inherited from ApiService
Defined in ApiService:51
Parameters :
Name Type Optional
requestParam RequestParams No
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 :
Name Optional
result No
Returns : (error: any) => Observable<any>
post
post(requestParam: RequestParams)
Inherited from ApiService
Defined in ApiService:101
Parameters :
Name Type Optional
requestParam RequestParams No
Returns : Observable<any>
setHeaders
setHeaders(session)
Inherited from ApiService
Defined in ApiService:35
Parameters :
Name Optional
session No
Returns : { Authorization: any; 'x-auth-token': any; 'X-authenticated-user-token': any; 'Content-Type': string; 'X-App-Id': any; deviceId: any; }

Properties

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:26
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 { Injectable, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { ModalController } from '@ionic/angular';
import { ApiService } from './api.service';
import { urlConstants } from '../constants/urlConstants';
import { ToastService } from './toast/toast.service';
import { AuthService, DeviceInfo,SharedPreferences } from 'sunbird-sdk';
import { ApiUtilsService } from './api-utils.service';
import { UtilityService } from '@app/services/utility-service';
import { HTTP } from '@ionic-native/http/ngx';

@Injectable({
  providedIn: 'root',
})
export class KendraApiService 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,
    private utilityService: UtilityService,
    public ionicHttp:HTTP
  ) {
    super(http, toast, modalController, authService, deviceInfo,preferences, utils,ionicHttp);
    !this.baseUrl ? this.utilityService.getBuildConfigValue('BASE_URL').then((url) => (this.baseUrl = url)) :'';
  }
}

results matching ""

    No results matching ""