UNPKG

finerio-pfm-unnax

Version:

This SDK lets you connect to [Finerio PFM API Unnax](http://ec2-3-16-174-50.us-east-2.compute.amazonaws.com:8082/swagger-ui/index.html#/) in an easier way.

30 lines (29 loc) 1.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const models_1 = require("../models"); class Insights { constructor(fcSdk) { this.fcSdk = fcSdk; this.resumePath = "/resume"; this.analysisPath = "/analysis"; } resume(resumeParams) { const params = resumeParams ? this.fcSdk.getUriParams(resumeParams) : ""; const uri = `${this.resumePath}${params}`; return this.fcSdk.doGet(uri, this.processResumeResponse); } processResumeResponse(response) { return new models_1.Resume(response); } analysis(analysisParams) { const params = analysisParams ? this.fcSdk.getUriParams(analysisParams) : ""; const uri = `${this.analysisPath}${params}`; return this.fcSdk.doGet(uri, this.processAnalysisResponse); } processAnalysisResponse(response) { return response.data.map((res) => new models_1.Analysis(res)); } } exports.default = Insights;