File

src/app/modules/core/services/certificate/certificate.service.ts

Index

Properties
Methods

Constructor

constructor(learnerService: LearnerService, configService: ConfigService)
Parameters :
Name Type Optional
learnerService LearnerService No
configService ConfigService No

Methods

fetchCertificatePreferences
fetchCertificatePreferences(data)
Parameters :
Name Optional
data No
getBatchDetails
getBatchDetails(bathId)
Parameters :
Name Optional
bathId No
Returns : any
validateCertificate
validateCertificate(data)
Parameters :
Name Optional
data No

Properties

Public configService
Type : ConfigService
Public learnerService
Type : LearnerService
import { LearnerService } from './../learner/learner.service';
import { Injectable } from '@angular/core';
import { ConfigService, ServerResponse } from '@sunbird/shared';
import { Observable } from 'rxjs';


@Injectable({
  providedIn: 'root'
})
export class CertificateService {

  constructor(public learnerService: LearnerService, public configService: ConfigService) {  }

  validateCertificate(data): Observable<ServerResponse> {
    const option = {
      url: this.configService.urlConFig.URLS.USER.VALIDATE_CERTIFICATE,
      data: data
    };
    return this.learnerService.post(option);

  }

  fetchCertificatePreferences(data): Observable<ServerResponse> {
    const option = {
      url: this.configService.urlConFig.URLS.TENANT_PREFERENCE.READ,
      data: data
    };
    return this.learnerService.post(option);
  }

  getBatchDetails(bathId) {
    const option = {
      url: `${this.configService.urlConFig.URLS.BATCH.GET_DETAILS}/${bathId}`
    };
    return this.learnerService.get(option);
  }
}

results matching ""

    No results matching ""