File

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

Extends

ApiService

Index

Properties
Methods

Constructor

constructor(http: HttpClient, toast: ToastService, modalController: ModalController, authService: AuthService, deviceInfo: DeviceInfo, preferences: SharedPreferences, utilityService: UtilityService, utils: ApiUtilsService, ionicHttp: HTTP)
Parameters :
Name Type Optional
http HttpClient No
toast ToastService No
modalController ModalController No
authService AuthService No
deviceInfo DeviceInfo No
preferences SharedPreferences No
utilityService UtilityService No
utils ApiUtilsService 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:27
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 { Inject, Injectable } from '@angular/core';
import { HTTP } from '@ionic-native/http/ngx';
import { ModalController } from '@ionic/angular';
import { AuthService, DeviceInfo,SharedPreferences } from '@project-sunbird/sunbird-sdk';
import { ToastService } from '.';
import { urlConstants } from '../constants/urlConstants';
import { ApiUtilsService } from './api-utils.service';
import { ApiService } from './api.service';
import { UtilityService } from '@app/services/utility-service';

@Injectable({
  providedIn: 'root',
})
export class DhitiApiService 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 utilityService: UtilityService,

    private utils: ApiUtilsService,
        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 ""