File

src/app/modules/workspace/services/review-comments/review-comments.service.ts

Index

Properties
Methods
Accessors

Constructor

constructor(configService: ConfigService, extPluginService: ExtPluginService)
Parameters :
Name Type Optional
configService ConfigService No
extPluginService ExtPluginService No

Methods

createComment
createComment(data)
Parameters :
Name Optional
data No
Returns : any
deleteComment
deleteComment(data)
Parameters :
Name Optional
data No
Returns : any
getComments
getComments(data)
Parameters :
Name Optional
data No
Returns : any

Properties

Private _contextDetails
Type : any
baseUrl
Type : string
Public configService
Type : ConfigService
Public extPluginService
Type : ExtPluginService

Accessors

contextDetails
getcontextDetails()
setcontextDetails(contextDetails)
Parameters :
Name Optional
contextDetails No
Returns : void
import { Injectable } from '@angular/core';
import { ConfigService } from '@sunbird/shared';
import { ExtPluginService } from '@sunbird/core';


@Injectable()
export class ReviewCommentsService {

  baseUrl: string;

  constructor(public configService: ConfigService, public extPluginService: ExtPluginService) {

  }
  private _contextDetails: any;
  getComments(data) {
    const option = {
      url: this.configService.urlConFig.URLS.REVIEW_COMMENT.READ,
      data: data
    };
    return this.extPluginService.post(option);
  }
  set contextDetails(contextDetails) {
    this._contextDetails = contextDetails;
  }
  get contextDetails() {
    return this._contextDetails;
  }
  createComment(data) {
    const option = {
      url: this.configService.urlConFig.URLS.REVIEW_COMMENT.CREATE,
      data: data
    };
    return this.extPluginService.post(option);
  }

  deleteComment(data) {
    const option = {
      url: this.configService.urlConFig.URLS.REVIEW_COMMENT.DELETE,
      data: data
    };
    return this.extPluginService.delete(option);
  }

}

results matching ""

    No results matching ""