File

src/app/manage-learn/core/services/unnati-data.service.ts

Extends

ApiService

Index

Properties
Methods

Constructor

constructor(http: HttpClient, toast: ToastService, modalController: ModalController, authService: AuthService, deviceInfo: DeviceInfo, preferences: SharedPreferences, utils: ApiUtilsService, ionicHttp: HTTP, utilityService: UtilityService)
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
ionicHttp HTTP No
utilityService UtilityService 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:22
baseUrl
Type : string
Inherited from ApiService
Defined in ApiService:17
Public deviceInfo
Type : DeviceInfo
Decorators :
@Inject('DEVICE_INFO')
Inherited from ApiService
Defined in ApiService:23
Public http
Type : HttpClient
Inherited from ApiService
Defined in ApiService:19
Public ionicHttp
Type : HTTP
Inherited from ApiService
Defined in ApiService:26
Public modalController
Type : ModalController
Inherited from ApiService
Defined in ApiService:21
Public preferences
Type : SharedPreferences
Decorators :
@Inject('SHARED_PREFERENCES')
Inherited from ApiService
Defined in ApiService:24
Public toast
Type : ToastService
Inherited from ApiService
Defined in ApiService:20
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 { HTTP } from '@ionic-native/http/ngx';
import { UtilityService } from '@app/services/utility-service';


@Injectable({
  providedIn: 'root',
})
export class UnnatiDataService 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.utils.getBaseUrl('projectsBaseUrl') + urlConstants.SERVICES.UNNATI;
    !this.baseUrl ? this.utilityService.getBuildConfigValue('BASE_URL').then((url) => (this.baseUrl = url)) :'';
  }
}

results matching ""

    No results matching ""