UNPKG

@soos-io/api-client

Version:

This is the SOOS API Client for registered clients leveraging the various integrations to the SOOS platform. Register for a free trial today at https://app.soos.io/register

25 lines (24 loc) 884 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const constants_1 = require("../constants"); const SOOSApiClient_1 = tslib_1.__importDefault(require("./SOOSApiClient")); class SOOSProjectsApiClient { baseUri; apiKey; client; constructor(apiKey, baseUri = constants_1.SOOS_CONSTANTS.Urls.API.Projects) { this.apiKey = apiKey; this.baseUri = baseUri; this.client = SOOSApiClient_1.default.create({ baseUri: this.baseUri, apiKey: this.apiKey, apiClientName: "Projects API", }); } async getProjectSettings({ clientId, projectHash, }) { const response = await this.client.get(`clients/${clientId}/projects/${projectHash}/settings?fallback=true`); return response.data; } } exports.default = SOOSProjectsApiClient;