import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs/Rx';
import Urls from './ta-urls';

@Injectable()
export class TaHttpService {

    constructor(private http: HttpClient) {

    }

    /**
   * Post add candidate
   *
   * @param {number} employeeId
   * @param {*} candidateDetails
   * @returns {Observable<any>}
   * @memberof TaHttpService
   */
    public addCandidate(candidateDetails: any): Observable<any> {
        return this.http.post(Urls.addCandidate, candidateDetails);
    }
    public editCandidate(candidateDetails: any): Observable<any> {
        return this.http.post(Urls.editCandidate, candidateDetails);
    }
    /**
   * get job titile
   * @returns {Observable<any>}
   * @memberof TaHttpService
   */
    public getJobTitle(): Observable<any> {
        return this.http.get(Urls.getJobTitle);
    }
}
